[Pkg-running-devel] [antpm] 01/01: gant: don't use devname for variable

Kristof Ralovich ralovich-guest at moszumanska.debian.org
Sat Aug 16 18:02:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

ralovich-guest pushed a commit to branch master
in repository antpm.

commit e19895c9f5969efdb1cc937f89646dde1f7625fd
Author: RALOVICH, Kristof <tade60 at freemail.hu>
Date:   Sat Aug 16 19:45:58 2014 +0200

    gant: don't use devname for variable
    
    it's problematic under freebsd
    
    /«PKGBUILDDIR»/src/gant/gant.c:110:6: error: 'devname' redeclared as different kind of symbol
     char devname[256];
          ^
    In file included from /usr/include/x86_64-kfreebsd-gnu/sys/stat.h:105:0,
                     from /«PKGBUILDDIR»/src/gant/gant.c:11:
    /usr/include/x86_64-kfreebsd-gnu/bits/stat.h:209:14: note: previous declaration of 'devname' was here
     extern char *devname(__dev_t dev, __mode_t type) __THROW;
                  ^
---
 debian/patches/gant-no-devname.patch | 33 +++++++++++++++++++++++++++++++++
 debian/patches/series                |  1 +
 2 files changed, 34 insertions(+)

diff --git a/debian/patches/gant-no-devname.patch b/debian/patches/gant-no-devname.patch
new file mode 100644
index 0000000..1f551d4
--- /dev/null
+++ b/debian/patches/gant-no-devname.patch
@@ -0,0 +1,33 @@
+--- a/src/gant/gant.c
++++ b/src/gant/gant.c
+@@ -107,7 +107,7 @@
+ uint waitauth;
+ int nphase0;
+ char modelname[256];
+-char devname[256];
++char deviname[256];
+ ushort part = 0;
+ ushort ver = 0;
+ uint unitid = 0;
+@@ -225,7 +225,7 @@
+    rc = xmlTextWriterEndElement(tcxfile); XML_ERROR_CHECK;		/* Lap (Is it a good idea to do it here?) */
+    rc = xmlTextWriterStartElement(tcxfile, BAD_CAST "Creator"); XML_ERROR_CHECK;
+    rc = xmlTextWriterWriteAttribute(tcxfile, BAD_CAST "xsi:type", BAD_CAST "Device_t"); XML_ERROR_CHECK;
+-   rc = xmlTextWriterWriteFormatElement(tcxfile, BAD_CAST "Name", "%s", devname); XML_ERROR_CHECK;
++   rc = xmlTextWriterWriteFormatElement(tcxfile, BAD_CAST "Name", "%s", deviname); XML_ERROR_CHECK;
+    rc = xmlTextWriterWriteFormatElement(tcxfile, BAD_CAST "UnitId", "%u", unitid); XML_ERROR_CHECK;
+    rc = xmlTextWriterWriteFormatElement(tcxfile, BAD_CAST "ProductID", "%u", part); XML_ERROR_CHECK;
+    rc = xmlTextWriterStartElement(tcxfile, BAD_CAST "Version"); XML_ERROR_CHECK;
+@@ -383,9 +383,9 @@
+ 	    dump_data(stderr, data+doff, 0, pktlen);
+ 	 break;
+       case 525:
+-	 memset(devname, 0, sizeof devname);
+-	 memcpy(devname, data + doff, pktlen);
+-	 DEBUG_OUT(1, "Packet %d: Devname: \"%s\"", pkttype, devname);
++	 memset(deviname, 0, sizeof deviname);
++	 memcpy(deviname, data + doff, pktlen);
++	 DEBUG_OUT(1, "Packet %d: Devname: \"%s\"", pkttype, deviname);
+ 	 break;
+       case 12:
+ 	 DEBUG_OUT(1, "Packet %d: xfer complete (subtype %u)", pkttype, data[doff] + data[doff + 1] * 256);
diff --git a/debian/patches/series b/debian/patches/series
index 3a96bf0..b39222b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+gant-no-devname.patch
 link-boost-atomic.patch
 04-fix-missing-IUCLC.patch
 01-include-cstdint

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/antpm.git



More information about the Pkg-running-devel mailing list