Merge pull request #1 from Memphiz/originalnfs
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 2 Jun 2011 07:48:03 +0000 (00:48 -0700)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 2 Jun 2011 07:48:03 +0000 (00:48 -0700)
First pullrequests for beeing some more plattform compatible :)

configure.ac
examples/nfsclient-raw.c
include/libnfs.h
lib/init.c
lib/pdu.c
lib/socket.c
mount/mount.c
nfs/nfs.c
portmap/portmap.c
rquota/rquota.c

index 8b9979681d2e348b942161053c175d2247372c89..71efb74b9c4bd31559ccb5be47af986152b4a90e 100644 (file)
@@ -63,40 +63,6 @@ libnfs_cv_HAVE_SOCK_SIN_LEN=yes,libnfs_cv_HAVE_SOCK_SIN_LEN=no)])
 if test x"$libnfs_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
     AC_DEFINE(HAVE_SOCK_SIN_LEN,1,[Whether the sockaddr_in struct has a sin_len property])
 fi
-
-AC_MSG_CHECKING(whether libpopt is available)
-ac_save_CFLAGS="$CFLAGS"
-ac_save_LIBS="$LIBS"
-CFLAGS="$CFLAGS $GLIB_CFLAGS"
-LIBS="$GLIB_LIBS $LIBS -lpopt"
-AC_TRY_RUN([
-/*
- * Just see if we can compile/link with popt
- */
-#include <popt.h>
-
-int main(int argc, const char *argv[])
-{
-       struct poptOption popt_options[] = {
-               POPT_TABLEEND
-       };
-       poptGetContext(argv[0], argc, argv, popt_options, POPT_CONTEXT_KEEP_FIRST);
-
-       return 0;
-}
-], ac_cv_have_popt=yes, ac_cv_have_popt=no,
-   [echo $ac_n "compile with POPT. Assuming OK... $ac_c"
-    ac_cv_have_popt=yes])
-CFLAGS="$ac_save_CFLAGS"
-LIBS="$ac_save_LIBS"
-if test "$ac_cv_have_popt" = yes ; then
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_RESULT(no)
-  AC_MSG_NOTICE(You need libpopt to compile libnfs. Install the libpopt-dev package.)
-  exit
-fi
-
 AC_SUBST(libdir)
 AC_SUBST(install)
 AC_SUBST(ldconfig)
index ad8576af6b219d04937c31d370958b2ab183bcf7..40be303736f436c50b8f239a4a4aa97e895b8ab9 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <poll.h>
 #include "libnfs.h"
 #include "libnfs-raw.h"
index 8defc101acf3a7f6a676e2508cfac27cdcc3aa09..93f8c3c06c1acf8c43625dcee7c52decdbf0dd19 100644 (file)
@@ -93,14 +93,14 @@ size_t nfs_get_writemax(struct nfs_context *nfs);
  * -errno : An error occured.
  *          data is the error string.
  */
-int nfs_mount_async(struct nfs_context *nfs, const char *server, const char *export, nfs_cb cb, void *private_data);
+int nfs_mount_async(struct nfs_context *nfs, const char *server, const char *exportname, nfs_cb cb, void *private_data);
 /*
  * Sync nfs mount.
  * Function returns
  *      0 : The operation was successfull.
  * -errno : The command failed.
  */
-int nfs_mount_sync(struct nfs_context *nfs, const char *server, const char *export);
+int nfs_mount_sync(struct nfs_context *nfs, const char *server, const char *exportname);
 
 
 
index fb2ae83512150b4f0eb0114eccbc11ec9b5dcad5..dde97d773062d8438e7c3c972a821740f275949d 100644 (file)
@@ -21,6 +21,8 @@
 #include <unistd.h>
 #include <string.h>
 #include <strings.h>
+#include <stdlib.h>
+#include <rpc/rpc.h>
 #include <rpc/xdr.h>
 #include "slist.h"
 #include "libnfs.h"
index 238d71de4370a153c0dd6b0864d3c95ea5bec385..8aefa5743d9d76f14f98b4d7e780d7ffb09d132a 100644 (file)
--- a/lib/pdu.c
+++ b/lib/pdu.c
@@ -17,6 +17,8 @@
 
 #include <stdio.h>
 #include <strings.h>
+#include <stdlib.h>
+#include <rpc/rpc.h>
 #include <rpc/xdr.h>
 #include <rpc/rpc_msg.h>
 #include "slist.h"
index d4354bb4972eaf07366ac474f46aa6b17cb59618..4701685591793c67f2811aa0b3858c7aa87aef66 100644 (file)
 */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <poll.h>
 #include <string.h>
 #include <errno.h>
+#include <rpc/rpc.h>
 #include <rpc/xdr.h>
 #include <arpa/inet.h>
 #include <sys/ioctl.h>
index 447052d8952e48d7306cf6697928981ee6dadd32..771a54917bcfdf5ddb8ae3bfdeea07f1106eacf7 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <stdio.h>
 #include <errno.h>
+#include <rpc/rpc.h>
 #include <rpc/xdr.h>
 #include "libnfs.h"
 #include "libnfs-raw.h"
index c21046a20bd9d5720a928c25c6327a87d349d054..a9775e7f3ab3d4cf5f9cc8a9c9287bd3c2c68490 100644 (file)
--- a/nfs/nfs.c
+++ b/nfs/nfs.c
@@ -18,6 +18,8 @@
 #include <stdio.h>
 #include <errno.h>
 #include <sys/stat.h>
+#include <string.h>
+#include <rpc/rpc.h>
 #include <rpc/xdr.h>
 #include "libnfs.h"
 #include "libnfs-raw.h"
index 4c10bd8546438ee8458407bf5b259a5ba35aafc1..1e51a8f1dae803c1a2618c122423d28e6c7a01ad 100644 (file)
@@ -16,6 +16,7 @@
 */
 
 #include <stdio.h>
+#include <rpc/rpc.h>
 #include <rpc/xdr.h>
 #include "libnfs.h"
 #include "libnfs-raw.h"
index e6a49de4a41be4ebec28d164c8959bd47e7626a4..640549b8e27326658fdcc918b8cab4b7f6def51d 100644 (file)
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include <sys/stat.h>
+#include <rpc/rpc.h>
 #include <rpc/xdr.h>
 #include "libnfs.h"
 #include "libnfs-raw.h"