Author: evgeni
Date: 2014-03-23 13:23:57 +0000 (Sun, 23 Mar 2014)
New Revision: 14984

Added:
   packages/trunk/desmume/debian/patches/bsd_sysctl_ftbfs_fix.patch
Modified:
   packages/trunk/desmume/debian/changelog
   packages/trunk/desmume/debian/patches/series
Log:
Fix FTBFS on *BSD due to sysctl() not taking const parameters


Modified: packages/trunk/desmume/debian/changelog
===================================================================
--- packages/trunk/desmume/debian/changelog     2014-03-23 12:05:42 UTC (rev 
14983)
+++ packages/trunk/desmume/debian/changelog     2014-03-23 13:23:57 UTC (rev 
14984)
@@ -1,3 +1,10 @@
+desmume (0.9.10-2) UNRELEASED; urgency=medium
+
+  * Fix FTBFS on *BSD due to sysctl() not taking const parameters.
+    Patch from upstream SVN trunk.
+
+ -- Evgeni Golov <[email protected]>  Sun, 23 Mar 2014 14:22:41 +0100
+
 desmume (0.9.10-1) unstable; urgency=low
 
   * New upstream release.

Added: packages/trunk/desmume/debian/patches/bsd_sysctl_ftbfs_fix.patch
===================================================================
--- packages/trunk/desmume/debian/patches/bsd_sysctl_ftbfs_fix.patch            
                (rev 0)
+++ packages/trunk/desmume/debian/patches/bsd_sysctl_ftbfs_fix.patch    
2014-03-23 13:23:57 UTC (rev 14984)
@@ -0,0 +1,15 @@
+diff --git a/src/utils/task.cpp b/src/utils/task.cpp
+index a169276..83cfa57 100644
+--- a/src/utils/task.cpp
++++ b/src/utils/task.cpp
+@@ -41,8 +41,8 @@ int getOnlineCores (void)
+       return sysconf(_SC_NPROCESSORS_ONLN);
+ #elif defined HOST_BSD
+       int cores;
+-      const int mib[4] = { CTL_HW, HW_NCPU, 0, 0 };
+-      const size_t len = sizeof(cores);
++      int mib[4] = { CTL_HW, HW_NCPU, 0, 0 };
++      size_t len = sizeof(cores); //don't make this const, i guess sysctl 
can't take a const *
+       sysctl(mib, 2, &cores, &len, NULL, 0);
+       return (cores < 1) ? 1 : cores;
+ #else

Modified: packages/trunk/desmume/debian/patches/series
===================================================================
--- packages/trunk/desmume/debian/patches/series        2014-03-23 12:05:42 UTC 
(rev 14983)
+++ packages/trunk/desmume/debian/patches/series        2014-03-23 13:23:57 UTC 
(rev 14984)
@@ -1,2 +1,3 @@
 01_use_system_tinyxml.patch
 add-keywords-to-desktop-files.patch
+bsd_sysctl_ftbfs_fix.patch


_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to