Squish various compiler warnings
* CPP's defined() is UB outside of a #if line * Use (void)! cast to prevent recent GCCs & glibc from warning about ignoring the return status from chdir()
This commit is contained in:
@@ -24,7 +24,12 @@
|
||||
#include <sched.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define USE_MEMLOCK (defined(_POSIX_MEMLOCK) && (_POSIX_MEMLOCK > 0) && !defined(__rtems__))
|
||||
#if (defined(_POSIX_MEMLOCK) && (_POSIX_MEMLOCK > 0) && !defined(__rtems__))
|
||||
# define USE_MEMLOCK 1
|
||||
#else
|
||||
# define USE_MEMLOCK 0
|
||||
#endif
|
||||
|
||||
#if USE_MEMLOCK
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user