Has anyone built ndmpcopy for Linux recently? The Solaris version doesn't seem to build anymore and the ndmp.org web site does not look very active anymore.
On Mon, May 21, 2007 at 02:23:02PM -0700, Augie Schwer wrote:
Has anyone built ndmpcopy for Linux recently? The Solaris version doesn't seem to build anymore and the ndmp.org web site does not look very active anymore.
The XDR_AND_SIZE macro in lib/ndmp_common.h is broken and all of the place there are missing system includes. Here is a patch:
---------------------------------------------------------------------- diff -u -r ndmpcopy-1.2/lib/ndmp_common.h ndmpcopy-1.2-new/lib/ndmp_common.h --- ndmpcopy-1.2/lib/ndmp_common.h 2000-09-13 00:13:15.000000000 +0200 +++ ndmpcopy-1.2-new/lib/ndmp_common.h 2007-05-22 07:33:21.000000000 +0200 @@ -37,7 +37,7 @@ #define USE_SELECT #endif
-#define XDR_AND_SIZE(func) (bool_t(*)(XDR*, ...))xdr_##func##,sizeof(func) +#define XDR_AND_SIZE(func) (bool_t(*)(XDR*, ...))xdr_##func,sizeof(func) #define AUTH_REQUIRED TRUE #define AUTH_NOT_REQUIRED FALSE
diff -u -r ndmpcopy-1.2/src/Makefile ndmpcopy-1.2-new/src/Makefile --- ndmpcopy-1.2/src/Makefile 2000-09-13 00:13:15.000000000 +0200 +++ ndmpcopy-1.2-new/src/Makefile 2007-05-22 07:34:43.000000000 +0200 @@ -34,9 +34,9 @@ LD = $(CC) LDFLAGS = # These should work for solaris 2.5 -LIBS = -L$(LIBDIR) -lndmp -lsocket -lnsl +#LIBS = -L$(LIBDIR) -lndmp -lsocket -lnsl # These should work for linux -#LIBS = -L$(LIBDIR) -lndmp +LIBS = -L$(LIBDIR) -lndmp
TARGET = ndmpcopy diff -u -r ndmpcopy-1.2/src/dump.c ndmpcopy-1.2-new/src/dump.c --- ndmpcopy-1.2/src/dump.c 2000-09-13 00:13:15.000000000 +0200 +++ ndmpcopy-1.2-new/src/dump.c 2007-05-22 07:36:03.000000000 +0200 @@ -21,6 +21,7 @@ * DEALINGS IN THE SOFTWARE. */
+#include <stdlib.h> #include <stdio.h> #include <errno.h> #include <string.h> diff -u -r ndmpcopy-1.2/src/file_history.c ndmpcopy-1.2-new/src/file_history.c --- ndmpcopy-1.2/src/file_history.c 2000-09-13 00:13:15.000000000 +0200 +++ ndmpcopy-1.2-new/src/file_history.c 2007-05-22 07:36:42.000000000 +0200 @@ -31,6 +31,8 @@ * user wants verbose output. */
+#include <stdio.h> + #include "ndmp_common.h" #include "queue.h" #include "main.h" diff -u -r ndmpcopy-1.2/src/log.c ndmpcopy-1.2-new/src/log.c --- ndmpcopy-1.2/src/log.c 2000-09-13 00:13:15.000000000 +0200 +++ ndmpcopy-1.2-new/src/log.c 2007-05-22 07:37:26.000000000 +0200 @@ -29,6 +29,8 @@ * The majority of this code was taken from the NDMP SDK client toolkit. */
+#include <stdio.h> + #include "ndmp_common.h" #include "ndmpc.h" #include "main.h" diff -u -r ndmpcopy-1.2/src/notify.c ndmpcopy-1.2-new/src/notify.c --- ndmpcopy-1.2/src/notify.c 2000-09-13 00:13:15.000000000 +0200 +++ ndmpcopy-1.2-new/src/notify.c 2007-05-22 07:35:27.000000000 +0200 @@ -29,6 +29,9 @@ * The majority of this code is taken from the NDMP SDK client toolkit. */
+#include <string.h> +#include <stdio.h> + #include "ndmp_common.h" #include "queue.h" #include "main.h" diff -u -r ndmpcopy-1.2/src/queue.c ndmpcopy-1.2-new/src/queue.c --- ndmpcopy-1.2/src/queue.c 2000-09-13 00:13:15.000000000 +0200 +++ ndmpcopy-1.2-new/src/queue.c 2007-05-22 07:26:35.000000000 +0200 @@ -22,6 +22,8 @@ */
#include <malloc.h> +#include <stdio.h> +#include <string.h> #include "main.h" #include "queue.h" #include "ndmp_common.h" ----------------------------------------------------------------------
Greetings,