Skip to content

Commit

Permalink
add apisupport-NONPOSIX-MEMLIMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
gperciva committed Apr 4, 2024
1 parent 61900e0 commit fd95468
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ libscrypt_sse2_la_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_X86_SSE2}`
noinst_LTLIBRARIES+= libscrypt_memlimit.la
libscrypt_memlimit_la_SOURCES= lib-platform/util/memlimit.c \
lib-platform/util/memlimit.h
libscrypt_memlimit_la_CFLAGS=-U_POSIX_C_SOURCE -U_XOPEN_SOURCE
libscrypt_memlimit_la_CFLAGS=`. ./apisupport-config.h; echo $${CFLAGS_NONPOSIX_MEMLIMIT}`

# Install libscrypt-kdf?
if LIBSCRYPT_KDF
Expand Down
19 changes: 19 additions & 0 deletions libcperciva/apisupport/Build/apisupport-NONPOSIX-MEMLIMIT.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "platform.h"

#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
#endif
#ifdef HAVE_SYS_SYSINFO_H
#include <sys/sysinfo.h>
#endif

int
main(void)
{

/* Success! */
return (0);
}
3 changes: 3 additions & 0 deletions libcperciva/apisupport/Build/apisupport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ fi
feature NONPOSIX SETGROUPS "" "" \
"-U_POSIX_C_SOURCE -U_XOPEN_SOURCE" \
"-U_POSIX_C_SOURCE -U_XOPEN_SOURCE -Wno-reserved-id-macro"
feature NONPOSIX MEMLIMIT "" "" \
"-U_POSIX_C_SOURCE -U_XOPEN_SOURCE" \
"-U_POSIX_C_SOURCE -U_XOPEN_SOURCE -Wno-reserved-id-macro"

# Detect how to compile libssl and libcrypto code.
feature LIBSSL HOST_NAME "-lssl" "" \
Expand Down

0 comments on commit fd95468

Please sign in to comment.