Subject: pkg/21909: pkgsrc/devel/glib doesn't build in FreeBSD 5.x + fix
To: None <gnats-bugs@gnats.netbsd.org>
From: None <juan@xtraeme.unixbsd.org>
List: netbsd-bugs
Date: 06/17/2003 00:54:58
>Number:         21909
>Category:       pkg
>Synopsis:       pkgsrc/devel/glib doesn't build in FreeBSD 5.x + fix
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 16 22:51:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Juan RP
>Release:        NetBSD 1.6T
>Organization:
>Environment:
System: NetBSD Insomnio 1.6T NetBSD 1.6T (Insomnio) #6: Tue Jun 10 06:28:59 CEST 2003 juan@Nocturno:/home/juan/current/obj/sys/arch/i386/compile/Insomnio i386
Architecture: i386
Machine: i386

FreeBSD Nocturno 5.1-RELEASE FreeBSD 5.1-RELEASE #2: Mon Jun 16 20:40:18 CEST 2003     root@Nocturno:/usr/obj/usr/src/sys/Nocturno  i386

>Description:

The glib package doesn't build in FreeBSD 5.x systems, anyway aplying
th pathes from the cvs of FreeBSD seems that all is OK now, I can run any
glib/gtk application.

>How-To-Repeat:
>Fix:

-- patch-af --

$NetBSD$

--- gutils.c.orig	Tue Jun 17 00:33:16 2003
+++ gutils.c	Tue Jun 17 00:34:21 2003
@@ -482,7 +482,10 @@
         struct passwd pwd;
 #    ifdef _SC_GETPW_R_SIZE_MAX  
         /* This reurns the maximum length */
+#ifdef __FreeBSD__
         guint bufsize = sysconf (_SC_GETPW_R_SIZE_MAX);
+       if (bufsize == UINT_MAX) bufsize = 64; /* XXX Correct for unimpelemented SC */
+#endif  /* __FreeBSD__ */
 #    else /* _SC_GETPW_R_SIZE_MAX */
         guint bufsize = 64;
 #    endif /* _SC_GETPW_R_SIZE_MAX */

-- End --

-- patch-ag


$NetBSD$

--- gmodule/gmodule-dl.c	2001/12/12 04:39:42	1.1
+++ gmodule/gmodule-dl.c	2001/12/12 04:41:05
@@ -100,6 +100,7 @@
 static gpointer
 _g_module_self (void)
 {
+#ifndef __FreeBSD__
   gpointer handle;
   
   /* to query symbols from the program itself, special link options
@@ -111,6 +112,9 @@
     g_module_set_error (fetch_dlerror ());
   
   return handle;
+#else
+  return RTLD_DEFAULT;
+#endif
 }
 
 static void


-- End --

>Release-Note:
>Audit-Trail:
>Unformatted: