diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2003-04-19 10:15:29 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2003-04-19 10:15:29 +0000 |
commit | 253d4c8ad22b31b3490e8b6be3e34c584994ec6b (patch) | |
tree | ff3c7dc54c99e920e7175209d9b59b72926d7be2 /devel/glib12 | |
parent | - Update to 0.4.1 (skipping 0.4.0 cause of configure problems) (diff) |
getpw*_r is now implemented in -CURRENT. However, the _SC_GETPW_R_SIZE_MAX
sysconf is not. This causes glib to try and malloc UINT_MAX bytes of memeory
which basically translates to -1 bytes. Sanity check the value returned by
sysconf (_SC_GETPW_R_SIZE_MAX) to see that it's really implemented. This
fixes an abort people started to see in Glib-based applications.
Reported by: Shin-ichi YOSHIMOTO <yosimoto@waishi.jp>
Notes
Notes:
svn path=/head/; revision=79270
Diffstat (limited to 'devel/glib12')
-rw-r--r-- | devel/glib12/Makefile | 2 | ||||
-rw-r--r-- | devel/glib12/files/patch-gutils.c | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/devel/glib12/Makefile b/devel/glib12/Makefile index a780d2d395bd..333c91a62e89 100644 --- a/devel/glib12/Makefile +++ b/devel/glib12/Makefile @@ -7,7 +7,7 @@ PORTNAME= glib PORTVERSION= 1.2.10 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/glib/1.2 diff --git a/devel/glib12/files/patch-gutils.c b/devel/glib12/files/patch-gutils.c new file mode 100644 index 000000000000..fab2a547801d --- /dev/null +++ b/devel/glib12/files/patch-gutils.c @@ -0,0 +1,10 @@ +--- gutils.c.orig Wed Aug 9 14:12:31 2000 ++++ gutils.c Sat Apr 19 06:09:28 2003 +@@ -483,6 +483,7 @@ + # ifdef _SC_GETPW_R_SIZE_MAX + /* This reurns the maximum length */ + guint bufsize = sysconf (_SC_GETPW_R_SIZE_MAX); ++ if (bufsize == UINT_MAX) bufsize = 64; /* XXX Correct for unimpelemented SC */ + # else /* _SC_GETPW_R_SIZE_MAX */ + guint bufsize = 64; + # endif /* _SC_GETPW_R_SIZE_MAX */ |