Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8071501

perfMemory_solaris.cpp failing to compile with "Error: dd_fd is not a member of DIR."

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 8u40, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b56
    • CPU:
      sparc
    • OS:
      solaris_11

      Backports

        Description


        > I just pulled the jdk9/dev gate today and hit a build failure on SPARC
        > Solaris 11.1 when compiling perfMemory_solaris.cpp in hotspot. I'm
        > using SS12u3 compilers. Anyone else see a similar error or know what
        > might be going wrong?
        >
        > ...hotspot/src/os/solaris/vm/perfMemory_solaris.cpp", line 337: Error: dd_fd is not a member of DIR.
        > ...hotspot/src/os/solaris/vm/perfMemory_solaris.cpp", line 369: Error: dd_fd is not a member of DIR."
        > gmake[8]: *** [perfMemory_solaris.o] Error 2

        This code was brought in via the recent CPU integration of bug 8050807. (Hi Jerry! - cc'd)

        It looks like Solaris has two potential definitions of DIR:

        #if defined(__USE_LEGACY_PROTOTYPES__)
        /* traditional SVR4 definition */
        typedef struct {
                int dd_fd; /* file descriptor */
                int dd_loc; /* offset in block */
                int dd_size; /* amount of valid data */
                char *dd_buf; /* directory block */
        } DIR; /* stream data from opendir() */
        #else
        /* default definition (POSIX conformant) */
        typedef struct {
                int d_fd; /* file descriptor */
                int d_loc; /* offset in block */
                int d_size; /* amount of valid data */
                char *d_buf; /* directory block */
        } DIR; /* stream data from opendir() */
        #endif /* __USE_LEGACY_PROTOTYPES__ */

        I can't see what controls __USE_LEGACY_PROTOTYPES__ but presumably either something in Solaris 11.1, or something in SS12u3 is causing this difference.

        David

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gthornbr Gerald Thornbrugh (Inactive)
                  Reporter:
                  ascarpino Anthony Scarpino
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  17 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: