8071501: perfMemory_solaris.cpp failing to compile with "Error: dd_fd is not a member of DIR."
authorgthornbr
Fri, 06 Mar 2015 17:19:08 -0800
changeset 29460 520bbffc79ca
parent 29459 d6252edb4fca
child 29461 3f6358b7c82c
8071501: perfMemory_solaris.cpp failing to compile with "Error: dd_fd is not a member of DIR." Summary: Force all Solaris builds to use the same version of the DIR structure. Reviewed-by: dcubed, dholmes, kvn
hotspot/src/os/solaris/vm/jvm_solaris.h
hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp
--- a/hotspot/src/os/solaris/vm/jvm_solaris.h	Fri Mar 06 08:47:51 2015 -0800
+++ b/hotspot/src/os/solaris/vm/jvm_solaris.h	Fri Mar 06 17:19:08 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,9 @@
  * JNI conversion, which should be sorted out later.
  */
 
+#define __USE_LEGACY_PROTOTYPES__
 #include <dirent.h>             /* For DIR */
+#undef __USE_LEGACY_PROTOTYPES__
 #include <sys/param.h>          /* For MAXPATHLEN */
 #include <sys/socket.h>         /* For socklen_t */
 #include <unistd.h>             /* For F_OK, R_OK, W_OK */
--- a/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp	Fri Mar 06 08:47:51 2015 -0800
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp	Fri Mar 06 17:19:08 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,9 @@
 
 
 # include <ctype.h>
+#define __USE_LEGACY_PROTOTYPES__
 # include <dirent.h>
+#undef __USE_LEGACY_PROTOTYPES__
 # include <string.h>
 # include <strings.h>     // for bsd'isms
 # include <stdarg.h>