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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 8u40, 9
    • hotspot
    • None
    • b56
    • sparc
    • solaris_11


        > 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

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

                Created:
                Updated:
                Resolved: