diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh index fdba47e..18dffc2 100644 --- a/sofort/ccenv/ccenv.sh +++ b/sofort/ccenv/ccenv.sh @@ -1440,6 +1440,19 @@ ccenv_set_os_gate_switches() fi } +ccenv_set_os_bsd_switches() +{ + case $ccenv_os in + *bsd*) + mb_cfgtest_headers='sys/mman.h' + + if ! cfgtest_macro_definition 'MAP_ANON'; then + ccenv_cflags_os="${ccenv_cflags_os} -D__BSD_VISIBLE" + fi + ;; + esac +} + ccenv_output_defs() { ccenv_in="$mb_project_dir/sofort/ccenv/ccenv.in" @@ -1806,6 +1819,7 @@ ccenv_set_toolchain_variables() ccenv_set_os_dso_patterns ccenv_set_os_pe_switches ccenv_set_os_gate_switches + ccenv_set_os_bsd_switches ccenv_set_cc_attr_visibility_vars ccenv_output_defs diff --git a/src/internal/slibtool_realpath_impl.c b/src/internal/slibtool_realpath_impl.c index 4e586a8..63fc3c4 100644 --- a/src/internal/slibtool_realpath_impl.c +++ b/src/internal/slibtool_realpath_impl.c @@ -18,6 +18,7 @@ #ifdef HAVE_SYS_SYSCALL_H #include +#include #endif #ifdef _MIDIPIX_ABI @@ -28,10 +29,6 @@ #define ENOTSUP EOPNOTSUPP #endif -#ifdef SYS___realpathat -extern long syscall(int, ...); -#endif - slbt_hidden int slbt_realpath( int fdat, const char * path,