[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#685625: [PATCH] Re: Bug#685625: implicit declaration of function ‘reallocf’



Control: tags -1 + patch

I believe the attached patch fixes the problem; it does on my system.

Because the impact of this bug is the inability to install or update the
bootloader (including, potentially, during initial installation), I
believe the severity should be increased to critical.  However, I am not
modifying the priority myself as I'm not yet familiar with the culture
around changing bug severity, particularly when escalating it.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-2-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libgeom1 depends on:
ii  libbsd0    0.4.2-1
ii  libc0.1    2.13-37
ii  libexpat1  2.1.0-1
ii  libsbuf6   9.0+ds1-3

libgeom1 recommends no packages.

libgeom1 suggests no packages.

-- no debconf information

diff -Nru freebsd-libs-9.0+ds1/debian/changelog freebsd-libs-9.0+ds1/debian/changelog
--- freebsd-libs-9.0+ds1/debian/changelog	2012-05-25 11:37:58.000000000 -0500
+++ freebsd-libs-9.0+ds1/debian/changelog	2012-12-21 13:21:53.000000000 -0600
@@ -1,3 +1,13 @@
+freebsd-libs (9.0+ds1-3.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix 'warning: implicit declaration of function 'reallocf'
+    (and several other functions) (Closes: 685625)
+  * Make that warning an error so that it does not pass silently
+    in the future 
+
+ -- Jeff Epler <jepler@unpythonic.net>  Fri, 21 Dec 2012 13:20:44 -0600
+
 freebsd-libs (9.0+ds1-3) unstable; urgency=low
 
   [ Robert Millan ]
diff -Nru freebsd-libs-9.0+ds1/debian/patches/implicit-declaration freebsd-libs-9.0+ds1/debian/patches/implicit-declaration
--- freebsd-libs-9.0+ds1/debian/patches/implicit-declaration	1969-12-31 18:00:00.000000000 -0600
+++ freebsd-libs-9.0+ds1/debian/patches/implicit-declaration	2012-12-21 13:26:04.000000000 -0600
@@ -0,0 +1,70 @@
+Description: Fix crashes due to undeclared functions
+ The consequence of at least one of these (in geom_getxml.c) was a crash
+ when there was a lot of data in kern.geom.confdml.
+ .
+ freebsd-libs (9.0+ds1-3.1) UNRELEASED; urgency=low
+ .
+   * Fix 'warning: implicit declaration of function 'reallocf'
+     (and several other functions) (Closes: 685625)
+Author: Jeff Epler <jepler@unpythonic.net>
+Bug-Debian: http://bugs.debian.org/685625
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Forwarded: no
+Last-Update: <2012-12-21>
+
+--- freebsd-libs-9.0+ds1.orig/lib/libdevstat/devstat.c
++++ freebsd-libs-9.0+ds1/lib/libdevstat/devstat.c
+@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
+ #include <sys/errno.h>
+ #include <sys/resource.h>
+ #include <sys/queue.h>
++#include <bsd/stdlib.h>
+ 
+ #include <ctype.h>
+ #include <err.h>
+--- freebsd-libs-9.0+ds1.orig/lib/libusbhid/usage.c
++++ freebsd-libs-9.0+ds1/lib/libusbhid/usage.c
+@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <bsd/stdio.h>
+ 
+ #include "usbhid.h"
+ 
+--- freebsd-libs-9.0+ds1.orig/lib/libgeom/geom_ctl.c
++++ freebsd-libs-9.0+ds1/lib/libgeom/geom_ctl.c
+@@ -39,6 +39,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <paths.h>
++#include <bsd/stdlib.h>
+ 
+ #include <sys/queue.h>
+ 
+--- freebsd-libs-9.0+ds1.orig/lib/libgeom/geom_getxml.c
++++ freebsd-libs-9.0+ds1/lib/libgeom/geom_getxml.c
+@@ -33,6 +33,8 @@
+ #include <sys/sysctl.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <bsd/stdlib.h>
++
+ #include "libgeom.h"
+ 
+ char *
+--- freebsd-libs-9.0+ds1.orig/sys/netinet/libalias/alias_db.c
++++ freebsd-libs-9.0+ds1/sys/netinet/libalias/alias_db.c
+@@ -157,6 +157,7 @@ __FBSDID("$FreeBSD$");
+ #include <sys/errno.h>
+ #include <sys/time.h>
+ #include <unistd.h> 
++#include <bsd/stdlib.h>
+ #endif
+ 
+ #include <sys/socket.h>
diff -Nru freebsd-libs-9.0+ds1/debian/patches/series freebsd-libs-9.0+ds1/debian/patches/series
--- freebsd-libs-9.0+ds1/debian/patches/series	2012-05-19 07:26:07.000000000 -0500
+++ freebsd-libs-9.0+ds1/debian/patches/series	2012-12-21 13:23:09.000000000 -0600
@@ -18,3 +18,4 @@
 libusb_backward.diff
 libbsd_nlist.diff
 kvm_size_t_kludge.diff
+implicit-declaration
diff -Nru freebsd-libs-9.0+ds1/debian/rules freebsd-libs-9.0+ds1/debian/rules
--- freebsd-libs-9.0+ds1/debian/rules	2012-05-25 11:34:52.000000000 -0500
+++ freebsd-libs-9.0+ds1/debian/rules	2012-12-21 12:44:17.000000000 -0600
@@ -18,7 +18,8 @@
 revision	:= $(shell echo $(full_version) | sed -e 's/^[^+-]*//g')
 
 CFLAGS = -Wall -g -pipe -fPIC -I. -I$(CURDIR)/sys -D_GNU_SOURCE \
-         -D__va_list=__builtin_va_list
+         -D__va_list=__builtin_va_list \
+	 -Werror=implicit-function-declaration
 
 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0

Reply to: