pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/libuv



Module Name:    pkgsrc
Committed By:   kamil
Date:           Fri Oct  6 15:58:15 UTC 2017

Modified Files:
        pkgsrc/devel/libuv: distinfo
Added Files:
        pkgsrc/devel/libuv/patches: patch-src_unix_netbsd.c

Log Message:
libuv: Fix build on NetBSD without KERN_PROC_PATHNAME

Add fallback implementation reading /proc/self/exe to exctract the
executable name.

PR pkg/52597 by Joern Clausen


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/devel/libuv/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/libuv/patches/patch-src_unix_netbsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/libuv/distinfo
diff -u pkgsrc/devel/libuv/distinfo:1.20 pkgsrc/devel/libuv/distinfo:1.21
--- pkgsrc/devel/libuv/distinfo:1.20    Fri Oct  6 04:22:47 2017
+++ pkgsrc/devel/libuv/distinfo Fri Oct  6 15:58:15 2017
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.20 2017/10/06 04:22:47 adam Exp $
+$NetBSD: distinfo,v 1.21 2017/10/06 15:58:15 kamil Exp $
 
 SHA1 (libuv-1.15.0.tar.gz) = 13a67a735516b2ec638af1d28b0aee07cb73b724
 RMD160 (libuv-1.15.0.tar.gz) = 4ec99f081b755c7670ff86f8f9ede55f9077a112
@@ -7,4 +7,5 @@ Size (libuv-1.15.0.tar.gz) = 1158746 byt
 SHA1 (patch-autogen.sh) = a5f48189bfb17624c545a80626ea311b7755d232
 SHA1 (patch-configure.ac) = e6636d522dc9218fc9aee62846426645473cb6cd
 SHA1 (patch-src_unix_fs.c) = 21fffa99df9528aedee0c6fe299d28ff5110d2ba
+SHA1 (patch-src_unix_netbsd.c) = 3386e702e3acc29bba6f3f5f612db728473b2a73
 SHA1 (patch-src_unix_thread.c) = 1ae58ceacc721421019c14eed5830c0a6dcf1768

Added files:

Index: pkgsrc/devel/libuv/patches/patch-src_unix_netbsd.c
diff -u /dev/null pkgsrc/devel/libuv/patches/patch-src_unix_netbsd.c:1.1
--- /dev/null   Fri Oct  6 15:58:15 2017
+++ pkgsrc/devel/libuv/patches/patch-src_unix_netbsd.c  Fri Oct  6 15:58:15 2017
@@ -0,0 +1,35 @@
+$NetBSD: patch-src_unix_netbsd.c,v 1.1 2017/10/06 15:58:15 kamil Exp $
+
+--- src/unix/netbsd.c.orig     2017-10-02 23:30:27.000000000 +0000
++++ src/unix/netbsd.c
+@@ -66,6 +66,7 @@ void uv_loadavg(double avg[3]) {
+ 
+ 
+ int uv_exepath(char* buffer, size_t* size) {
++#if defined(KERN_PROC_PATHNAME)
+   /* Intermediate buffer, retrieving partial path name does not work
+    * As of NetBSD-8(beta), vnode->path translator does not handle files
+    * with longer names than 31 characters.
+@@ -93,6 +94,22 @@ int uv_exepath(char* buffer, size_t* siz
+ 
+   /* Set new size. */
+   *size = strlen(buffer);
++#else
++  ssize_t n;
++
++  if (buffer == NULL || size == NULL || *size == 0)
++    return -EINVAL;
++
++  n = *size - 1;
++  if (n > 0)
++    n = readlink("/proc/self/exe", buffer, n);
++
++  if (n == -1)
++    return -errno;
++
++  buffer[n] = '\0';
++  *size = n;
++#endif
+ 
+   return 0;
+ }



Home | Main Index | Thread Index | Old Index