Code

patches: Added static_sstrerror.dpatch.
authorSebastian Harl <sh@tokkee.org>
Sat, 6 Jun 2009 13:57:00 +0000 (15:57 +0200)
committerSebastian Harl <sh@tokkee.org>
Sat, 6 Jun 2009 14:01:13 +0000 (16:01 +0200)
This is an upstream patch to make a private function in liboping static.

Build-depend on and use dpatch.

debian/changelog
debian/control
debian/patches/00list [new file with mode: 0644]
debian/patches/static_sstrerror.dpatch [new file with mode: 0755]
debian/rules

index 0f73e6f3be8606d0bfd37c48b6fa490480284045..74b336542f7cf38ac09eae73ca9187c13936e1f0 100644 (file)
@@ -6,12 +6,17 @@ liboping (1.1.2-1) unstable; urgency=low
     - Do not ignore 'make clean' errors.
     - Use config.{guess,sub} provided by autotools-dev to fix a FTBFS on
       avr32, thanks to Bradley Smith for reporting this (Closes: #529460).
+    - Use dpatch.
   * debian/control:
     - Use ${binary:Version} instead of ${Source-Version}.
     - Updated Standards-Version to 3.8.1.
     - Added Homepage and Vcs-{Git,Browser} fields.
+    - Build-depend on dpatch.
+  * debian/patches/:
+    - Added static_sstrerror.dpatch - upstream patch to make a private
+      function in liboping static.
 
- -- Sebastian Harl <tokkee@debian.org>  Sat, 06 Jun 2009 15:43:49 +0200
+ -- Sebastian Harl <tokkee@debian.org>  Sat, 06 Jun 2009 15:56:40 +0200
 
 liboping (0.3.5-1) unstable; urgency=low
 
index c10e1efdec42496a15772cb46a2daa202f4e117d..24042895d86e7c7f8507541c06241e954cfcc97c 100644 (file)
@@ -2,7 +2,7 @@ Source: liboping
 Section: libs
 Priority: optional
 Maintainer: Sebastian Harl <tokkee@debian.org>
-Build-Depends: debhelper (>= 4.0.0), autotools-dev
+Build-Depends: debhelper (>= 4.0.0), autotools-dev, dpatch
 Standards-Version: 3.8.1
 Homepage: http://verplant.org/liboping/
 Vcs-Git: git://git.tokkee.org/pkg-liboping.git
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644 (file)
index 0000000..febb817
--- /dev/null
@@ -0,0 +1,2 @@
+static_sstrerror.dpatch
+
diff --git a/debian/patches/static_sstrerror.dpatch b/debian/patches/static_sstrerror.dpatch
new file mode 100755 (executable)
index 0000000..564102c
--- /dev/null
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## static_sstrerror.dpatch by Sebastian Harl <sh@tokkee.org>
+##
+## DP: src/liboping.c: Made sstrerror() static.
+## DP:
+## DP: This is a private helper function only.
+
+@DPATCH@
+
+diff a/src/liboping.c b/src/liboping.c
+--- a/src/liboping.c
++++ b/src/liboping.c
+@@ -145,7 +145,7 @@ struct pingobj
+ /* Even though Posix requires "strerror_r" to return an "int",
+  * some systems (e.g. the GNU libc) return a "char *" _and_
+  * ignore the second argument ... -tokkee */
+-char *sstrerror (int errnum, char *buf, size_t buflen)
++static char *sstrerror (int errnum, char *buf, size_t buflen)
+ {
+       buf[0] = 0;
index 43ed9fc18f35d2b1b990ab14f8e4b8fd1b0e99c2..9fe0725e7e99eecd5e332bde1ce7d97445a6d2ec 100755 (executable)
@@ -19,7 +19,9 @@ else
        CFLAGS += -O2
 endif
 
-config.status: configure
+include /usr/share/dpatch/dpatch.make
+
+config.status: configure $(DPATCH_STAMPFN)
        dh_testdir
        
        for file in config.guess config.sub; do \
@@ -40,7 +42,7 @@ build-stamp:  config.status
        
        touch build-stamp
 
-clean:
+clean: unpatch
        dh_testdir
        dh_testroot
        rm -f build-stamp