[uClibc] glib-1.2.10 & uClibc

David Meggy dmeggy at techsol.ca
Fri Oct 24 17:17:48 UTC 2003


Here is a patch to get glib-1.2 to work with uClibc 0.9.21

diff -urN glib-1.2.10-orig/gutils.c glib-1.2.10/gutils.c
--- glib-1.2.10-orig/gutils.c	Wed Aug  9 11:12:31 2000
+++ glib-1.2.10/gutils.c	Thu Oct 23 09:31:05 2003
@@ -480,12 +480,7 @@
 	
 #  ifdef HAVE_GETPWUID_R
         struct passwd pwd;
-#    ifdef _SC_GETPW_R_SIZE_MAX  
-        /* This reurns the maximum length */
-        guint bufsize = sysconf (_SC_GETPW_R_SIZE_MAX);
-#    else /* _SC_GETPW_R_SIZE_MAX */
         guint bufsize = 64;
-#    endif /* _SC_GETPW_R_SIZE_MAX */
         gint error;
 	
         do


This should probably be added here:
http://www.uclibc.org/uClibc-apps.html

If this patch isn't applied sysconf returns -1, which glib uses as an
arguement to malloc, which causes the program to crash.


David

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
     David Meggy
     Engineering

Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
     www.techsol.ca

eMail: dmeggy at techsol.ca
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~




More information about the uClibc mailing list