[PATCH][SAMBA3] fix samba 3 IRIX build

James Peach jpeach at sgi.com
Fri May 6 05:50:14 GMT 2005


Hi all,

The attached diff (against svn HEAD) restores the Samba build on (at
least) IRIX. It's nothing too thrilling, just a couple of missing macro
definitions ..

-- 
James Peach | jpeach at sgi.com | SGI Australian Software Group
I don't speak for SGI.
-------------- next part --------------
Index: nsswitch/winbindd_nss.h
===================================================================
--- nsswitch/winbindd_nss.h	(revision 6623)
+++ nsswitch/winbindd_nss.h	(working copy)
@@ -10,6 +10,15 @@
    products. You do not need to give any attribution.  
 */
 
+
+#ifndef CONST_DISCARD
+#define CONST_DISCARD(type, ptr)      ((type) ((void *) (ptr)))
+#endif
+
+#ifndef CONST_ADD
+#define CONST_ADD(type, ptr)          ((type) ((const void *) (ptr)))
+#endif
+
 #ifndef SAFE_FREE
 #define SAFE_FREE(x) do { if(x) {free(CONST_DISCARD(void *, (x))); x=NULL;} } while(0)
 #endif
Index: nsswitch/winbind_nss_irix.c
===================================================================
--- nsswitch/winbind_nss_irix.c	(revision 6623)
+++ nsswitch/winbind_nss_irix.c	(working copy)
@@ -122,7 +122,7 @@
 }
 
 static void
-dequeue_request()
+dequeue_request(void)
 {
 	nsd_file_t *rq;
 	struct winbindd_request *request;
Index: nsswitch/wb_common.c
===================================================================
--- nsswitch/wb_common.c	(revision 6623)
+++ nsswitch/wb_common.c	(working copy)
@@ -26,9 +26,6 @@
 
 #include "winbind_client.h"
 
-#define CONST_DISCARD(type, ptr)      ((type) ((void *) (ptr)))
-#define CONST_ADD(type, ptr)          ((type) ((const void *) (ptr)))
-
 /* Global variables.  These are effectively the client state information */
 
 int winbindd_fd = -1;           /* fd for winbindd socket */
 
 /* Connect to winbindd socket */
Index: lib/socket_wrapper.c
===================================================================
--- lib/socket_wrapper.c	(revision 6623)
+++ lib/socket_wrapper.c	(working copy)
@@ -19,7 +19,7 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#ifdef _SAMBA_BUILD
+#ifdef _SAMBA_BUILD_
 #include "includes.h"
 #include "system/network.h"
 #else
Index: configure.in
===================================================================
--- configure.in	(revision 6623)
+++ configure.in	(working copy)
@@ -313,6 +313,14 @@
 
 AC_CHECK_TOOL(AR, ar)
 
+case "$CPPFLAGS" in 
+    *_SAMBA_BUILD_*)
+	;;
+    *)
+	CPPFLAGS="$CPPFLAGS -D_SAMBA_BUILD_"
+	;;
+esac
+
 dnl Check if we use GNU ld
 LD=ld
 AC_PROG_LD_GNU


More information about the samba-technical mailing list