Fix build errors on CentOS 6
authorJacob Welsh <jwelsh@sinenomine.net>
Tue, 29 Oct 2013 21:23:46 +0000 (17:23 -0400)
committerJacob Welsh <jwelsh@sinenomine.net>
Tue, 29 Oct 2013 21:23:46 +0000 (17:23 -0400)
stropts.h not present on Linux/BSD (maybe still needed on Sun?)

Link with libafsrpc, libafsauthent instead of individual AFS libraries,
as in rxkad-kdf patch from Russ Allbery and Jeffrey Altman
https://lists.openafs.org/pipermail/openafs-info/2013-August/039828.html

Makefile.am
mod_waklog.c

index 932b17b..9a91c86 100644 (file)
@@ -3,8 +3,7 @@ all: mod_waklog.so
 APXS = @APXS@
 INCLUDES = -I@KRB5_INC@ -I@AFS_INC@ -I@APACHE_INC@ -I@APR_INC@
 LIB = -L@AFS_LIBS@ -L@KRB5_LIBS@ -L@APACHE_LIBS@ -lkrb5 -lk5crypto  \
-       -lprot -lauth -lresolv -lubik -lrxkad -lsys -lrx -llwp -ldes \
-       -lcom_err -lafsutil
+       -lafsauthent -lafsrpc
 
 APXSCC = `${APXS} -q CC` \
          @WAKLOG_DEBUG@ \
index 023028b..1451191 100644 (file)
@@ -10,6 +10,7 @@
 
 #ifdef sun
 #include <synch.h>
+#include <stropts.h>
 #elif linux
 #define use_pthreads
 #include <features.h>
@@ -71,7 +72,6 @@ const char *userdata_key = "waklog_init";
 /**************************************************************************************************/
 
 #include <krb5.h>
-#include <stropts.h>
 
 #include <afs/param.h>
 
@@ -169,7 +169,6 @@ int renewcount = 0;
 #if defined(sun)
 #include <sys/ioccom.h>
 #endif /* sun */
-#include <stropts.h>
 #include <afs/venus.h>
 #include <afs/auth.h>
 #include <afs/dirpath.h>