pkgsrc-Bugs archive

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

pkg/52956: firefox-58.0 fails to build on NetBSD/i386 7.1.1



>Number:         52956
>Category:       pkg
>Synopsis:       firefox-58.0 fails to build on NetBSD/i386 7.1.1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 28 05:45:00 +0000 2018
>Originator:     Izumi Tsutsui
>Release:        NetBSD 7.1.1
>Organization:
>Environment:
System: NetBSD 7.1.1
Architecture: i386
Machine: i386
>Description:
firefox-58.0/xpcom/build/BinaryPath.h seems to use sysctl(3)
with KERN_PROC_PATHNAME to get pathname of the command,
but NetBSD 7.x and prior doesn't have KERN_PROC_PATHNAME
at least in <sys/sysctl.h> so pkgsrc build fails.
 http://cvsweb.netbsd.org/cgi-bin/cvsweb.cgi/src/sys/sys/sysctl.h#rev1.216

>How-To-Repeat:
make package on NetBSD 7.1.1 machines.

>Fix:
Check about KERN_PROC_PATHNAME and use other method?
(in a new patches/patch-xpcom_build_BinaryPath.h)
---
$NetBSD$

NetBSD 7.x and prior doesn't have KERN_PROC_PATHNAME for KERN_PROC_ARGS.

--- xpcom/build/BinaryPath.h.orig	2018-01-11 20:17:07.000000000 +0000
+++ xpcom/build/BinaryPath.h
@@ -22,7 +22,8 @@
     defined(__OpenBSD__)
 #include <sys/sysctl.h>
 #endif
-#if defined(__OpenBSD__)
+#if defined(__OpenBSD__) || \
+    (defined(__NetBSD__) && !defined(KERN_PROC_PATHNAME))
 #include <sys/stat.h>
 #endif
 #include "mozilla/UniquePtr.h"
@@ -172,7 +173,8 @@ private:
   }
 
 #elif defined(__FreeBSD__) || defined(__DragonFly__) || \
-      defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+      defined(__FreeBSD_kernel__) || \
+      (defined(__NetBSD__) && defined(KERN_PROC_PATHNAME))
   static nsresult Get(char aResult[MAXPATHLEN])
   {
     int mib[4];
@@ -195,7 +197,8 @@ private:
     return NS_OK;
   }
 
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) ||
+      (defined(__NetBSD__) && !defined(KERN_PROC_PATHNAME))
   static nsresult Get(char aResult[MAXPATHLEN])
   {
     int mib[4];



Home | Main Index | Thread Index | Old Index