1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: always define _XPG4_2 and __EXTENSIONS__ on Solaris/illumos

This commit is contained in:
Albert Lee
2025-05-16 01:53:03 +00:00
committed by Sébastien Helleu
parent e98a32373e
commit 7fb3ca6686
2 changed files with 6 additions and 7 deletions
+6
View File
@@ -238,6 +238,12 @@ if(ENABLE_LARGEFILE)
add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES)
endif()
# _XPG4_2 is needed for macros like CMSG_SPACE
# __EXTENSIONS__ is needed for constants like NI_MAXHOST and for struct timeval
if(CMAKE_HOST_SOLARIS)
add_definitions(-D_XPG4_2 -D__EXTENSIONS__)
endif()
# Check for libgcrypt
pkg_check_modules(LIBGCRYPT REQUIRED libgcrypt)
include_directories(${LIBGCRYPT_INCLUDE_DIRS})
-7
View File
@@ -28,13 +28,6 @@
#include "config.h"
#endif
/* _XPG4_2 is needed on SunOS for macros like CMSG_SPACE */
/* __EXTENSIONS__ is needed on SunOS for constants like NI_MAXHOST */
#ifdef __sun
#define _XPG4_2
#define __EXTENSIONS__
#endif
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>