Opened 8 years ago

Closed 8 years ago

#418 closed defect (fixed)

Compile error on Solaris 11

Reported by: rainer Owned by: rainer
Priority: major Milestone: 4.2.1
Component: main Version:
Keywords: Cc:

Description

The

#define _XOPEN_SOURCE 600 

in src/slib.c causes the following error (reported by Rolf)

/usr/include/sys/feature_tests.h:358:2: error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications       require the use of c99"
 #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications \

x_slib.c: In function 'sl_strncasecmp':
x_slib.c:1099:5: warning: implicit declaration of function 'strncasecmp' [-Wimplicit-function-declaration]
     return (strncasecmp(a, b, n));

x_slib.c: In function 'sl_check_mincore':
x_slib.c:2174:8: warning: implicit declaration of function 'mincore' [-Wimplicit-function-declaration]
        mincore(f_map, fbuf.st_size, vec);

We need to downgrade to _XOPEN_SOURCE 500 like this:

#if defined(__sun) || defined(__sun__) || defined(sun)
#define _XOPEN_SOURCE 500
#else
#define _XOPEN_SOURCE 600
#endif

Change History (1)

comment:1 by rainer, 8 years ago

Resolution: fixed
Status: newclosed

Believed to be fixed by changeset [523].

Note: See TracTickets for help on using tickets.