diff options
author | jbeich <jbeich@FreeBSD.org> | 2017-06-23 07:55:02 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2017-06-23 07:55:02 +0800 |
commit | a147765815b666d20e482be80bd0d39a7f25a9a4 (patch) | |
tree | f00ffc1bc91467a83df8e82be81e5884014ba527 | |
parent | 0df7493e9608400ae6a2f7489f48d9dd02668791 (diff) | |
download | freebsd-ports-gnome-a147765815b666d20e482be80bd0d39a7f25a9a4.tar.gz freebsd-ports-gnome-a147765815b666d20e482be80bd0d39a7f25a9a4.tar.zst freebsd-ports-gnome-a147765815b666d20e482be80bd0d39a7f25a9a4.zip |
devel/android-tools-{adb,fastboot}-devel: adjust KERN_PROC_PATHNAME after r444135
-rw-r--r-- | devel/android-tools-adb-devel/files/patch-base_file.cpp | 10 | ||||
-rw-r--r-- | devel/android-tools-fastboot-devel/files/patch-base_file.cpp | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/devel/android-tools-adb-devel/files/patch-base_file.cpp b/devel/android-tools-adb-devel/files/patch-base_file.cpp index 337ee8b0c8e3..ca20501150a6 100644 --- a/devel/android-tools-adb-devel/files/patch-base_file.cpp +++ b/devel/android-tools-adb-devel/files/patch-base_file.cpp @@ -21,7 +21,7 @@ #if defined(_WIN32) #include <windows.h> #define O_CLOEXEC O_NOINHERIT -@@ -251,6 +257,17 @@ std::string GetExecutablePath() { +@@ -251,6 +258,23 @@ std::string GetExecutablePath() { if (result == 0 || result == sizeof(path) - 1) return ""; path[PATH_MAX - 1] = 0; return path; @@ -30,9 +30,15 @@ + size_t path_len = sizeof(path); + int mib[] = { + CTL_KERN, ++#if defined(__NetBSD__) ++ KERN_PROC_ARGS, ++ -1, ++ KERN_PROC_PATHNAME, ++#else + KERN_PROC, + KERN_PROC_PATHNAME, -+ getpid() ++ -1, ++#endif + }; + int rc = sysctl(mib, arraysize(mib), path, &path_len, NULL, 0); + return rc ? "" : path; diff --git a/devel/android-tools-fastboot-devel/files/patch-base_file.cpp b/devel/android-tools-fastboot-devel/files/patch-base_file.cpp index 337ee8b0c8e3..ca20501150a6 100644 --- a/devel/android-tools-fastboot-devel/files/patch-base_file.cpp +++ b/devel/android-tools-fastboot-devel/files/patch-base_file.cpp @@ -21,7 +21,7 @@ #if defined(_WIN32) #include <windows.h> #define O_CLOEXEC O_NOINHERIT -@@ -251,6 +257,17 @@ std::string GetExecutablePath() { +@@ -251,6 +258,23 @@ std::string GetExecutablePath() { if (result == 0 || result == sizeof(path) - 1) return ""; path[PATH_MAX - 1] = 0; return path; @@ -30,9 +30,15 @@ + size_t path_len = sizeof(path); + int mib[] = { + CTL_KERN, ++#if defined(__NetBSD__) ++ KERN_PROC_ARGS, ++ -1, ++ KERN_PROC_PATHNAME, ++#else + KERN_PROC, + KERN_PROC_PATHNAME, -+ getpid() ++ -1, ++#endif + }; + int rc = sysctl(mib, arraysize(mib), path, &path_len, NULL, 0); + return rc ? "" : path; |