134 lines
4.1 KiB
Diff
134 lines
4.1 KiB
Diff
--- mk-conf.sh.orig 2016-06-22 08:36:16.578971502 +0200
|
|
+++ mk-conf.sh 2016-06-22 08:37:06.083455222 +0200
|
|
@@ -1030,7 +1030,7 @@ run_check() {
|
|
# May be multiline..
|
|
[ -n "${OS_DEFINES}" ] && printf -- "${OS_DEFINES}" >> ${h}
|
|
|
|
-if run_check clock_gettime 'clock_gettime(2)' \
|
|
+if link_check clock_gettime 'clock_gettime(2)' \
|
|
'#define HAVE_CLOCK_GETTIME' << \!
|
|
#include <time.h>
|
|
# include <errno.h>
|
|
@@ -1044,7 +1044,7 @@ int main(void){
|
|
!
|
|
then
|
|
:
|
|
-elif run_check clock_gettime 'clock_gettime(2) (via -lrt)' \
|
|
+elif link_check clock_gettime 'clock_gettime(2) (via -lrt)' \
|
|
'#define HAVE_CLOCK_GETTIME' '-lrt' << \!
|
|
#include <time.h>
|
|
# include <errno.h>
|
|
@@ -1058,7 +1058,7 @@ int main(void){
|
|
!
|
|
then
|
|
:
|
|
-elif run_check gettimeofday 'gettimeofday(2)' \
|
|
+elif link_check gettimeofday 'gettimeofday(2)' \
|
|
'#define HAVE_GETTIMEOFDAY' << \!
|
|
#include <stdio.h> /* For C89 NULL */
|
|
#include <sys/time.h>
|
|
@@ -1077,7 +1077,7 @@ else
|
|
have_no_subsecond_time=1
|
|
fi
|
|
|
|
-if run_check userdb 'gete?[gu]id(2), getpwuid(3), getpwnam(3)' << \!
|
|
+if link_check userdb 'gete?[gu]id(2), getpwuid(3), getpwnam(3)' << \!
|
|
#include <pwd.h>
|
|
#include <unistd.h>
|
|
# include <errno.h>
|
|
--- mk-conf.sh.orig 2016-06-22 08:38:55.108571929 +0200
|
|
+++ mk-conf.sh 2016-06-22 08:40:20.004493378 +0200
|
|
@@ -1186,7 +1186,7 @@ int main(void)
|
|
}
|
|
!
|
|
|
|
-run_check pathconf 'pathconf(2)' '#define HAVE_PATHCONF' << \!
|
|
+link_check pathconf 'pathconf(2)' '#define HAVE_PATHCONF' << \!
|
|
#include <unistd.h>
|
|
#include <errno.h>
|
|
int main(void){
|
|
@@ -1200,7 +1200,7 @@ int main(void){
|
|
}
|
|
!
|
|
|
|
-run_check pipe2 'pipe2(2)' '#define HAVE_PIPE2' << \!
|
|
+link_check pipe2 'pipe2(2)' '#define HAVE_PIPE2' << \!
|
|
#include <fcntl.h>
|
|
#include <unistd.h>
|
|
# include <errno.h>
|
|
@@ -1214,7 +1214,7 @@ int main(void){
|
|
!
|
|
|
|
# We use this only then for now (need NOW+1)
|
|
-run_check utimensat 'utimensat(2)' '#define HAVE_UTIMENSAT' << \!
|
|
+link_check utimensat 'utimensat(2)' '#define HAVE_UTIMENSAT' << \!
|
|
#include <fcntl.h> /* For AT_* */
|
|
#include <sys/stat.h>
|
|
# include <errno.h>
|
|
@@ -1320,7 +1320,7 @@ int main(void){
|
|
!
|
|
fi # have_setlocale
|
|
|
|
-run_check realpath 'realpath(3)' '#define HAVE_REALPATH' << \!
|
|
+link_check realpath 'realpath(3)' '#define HAVE_REALPATH' << \!
|
|
#include <stdlib.h>
|
|
int main(void){
|
|
#if 1 /* TODO for now we use realpath(3) without NULL as 2nd arg! */
|
|
@@ -1381,7 +1381,7 @@ fi
|
|
##
|
|
|
|
if feat_yes DOTLOCK; then
|
|
- if run_check readlink 'readlink(2)' << \!
|
|
+ if link_check readlink 'readlink(2)' << \!
|
|
#include <unistd.h>
|
|
# include <errno.h>
|
|
int main(void){
|
|
@@ -1400,7 +1400,7 @@ int main(void){
|
|
fi
|
|
|
|
if feat_yes DOTLOCK; then
|
|
- if run_check fchown 'fchown(2)' << \!
|
|
+ if link_check fchown 'fchown(2)' << \!
|
|
#include <unistd.h>
|
|
# include <errno.h>
|
|
int main(void){
|
|
@@ -1459,11 +1459,11 @@ int main(void){
|
|
}
|
|
!
|
|
|
|
- < ${tmp2}.c run_check af_unix 'AF_UNIX sockets' \
|
|
+ < ${tmp2}.c link_check af_unix 'AF_UNIX sockets' \
|
|
'#define HAVE_UNIX_SOCKETS' ||
|
|
- < ${tmp2}.c run_check af_unix 'AF_UNIX sockets (via -lnsl)' \
|
|
+ < ${tmp2}.c link_check af_unix 'AF_UNIX sockets (via -lnsl)' \
|
|
'#define HAVE_UNIX_SOCKETS' '-lnsl' ||
|
|
- < ${tmp2}.c run_check af_unix 'AF_UNIX sockets (via -lsocket -lnsl)' \
|
|
+ < ${tmp2}.c link_check af_unix 'AF_UNIX sockets (via -lsocket -lnsl)' \
|
|
'#define HAVE_UNIX_SOCKETS' '-lsocket -lnsl'
|
|
fi
|
|
|
|
@@ -1485,11 +1485,11 @@ int main(void){
|
|
}
|
|
!
|
|
|
|
- < ${tmp2}.c run_check sockets 'sockets' \
|
|
+ < ${tmp2}.c link_check sockets 'sockets' \
|
|
'#define HAVE_SOCKETS' ||
|
|
- < ${tmp2}.c run_check sockets 'sockets (via -lnsl)' \
|
|
+ < ${tmp2}.c link_check sockets 'sockets (via -lnsl)' \
|
|
'#define HAVE_SOCKETS' '-lnsl' ||
|
|
- < ${tmp2}.c run_check sockets 'sockets (via -lsocket -lnsl)' \
|
|
+ < ${tmp2}.c link_check sockets 'sockets (via -lsocket -lnsl)' \
|
|
'#define HAVE_SOCKETS' '-lsocket -lnsl' ||
|
|
feat_bail_required SOCKETS
|
|
else
|
|
@@ -1591,7 +1591,7 @@ int main(void){
|
|
fi
|
|
|
|
feat_yes SOCKETS &&
|
|
-run_check setsockopt 'setsockopt(2)' '#define HAVE_SETSOCKOPT' << \!
|
|
+link_check setsockopt 'setsockopt(2)' '#define HAVE_SETSOCKOPT' << \!
|
|
#include <sys/socket.h>
|
|
#include <stdlib.h>
|
|
# include <errno.h>
|