mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-08 06:31:58 +00:00
added binary detection for NetBSD
This commit is contained in:
@@ -3062,6 +3062,17 @@ char *uwsgi_get_binary_path(char *argvzero) {
|
||||
return buf;
|
||||
}
|
||||
free(buf);
|
||||
#elif defined(__NetBSD__)
|
||||
char *buf = uwsgi_malloc(PATH_MAX+1);
|
||||
ssize_t len = readlink("/proc/curproc/exe", buf, PATH_MAX);
|
||||
if (len > 0) {
|
||||
return buf;
|
||||
}
|
||||
|
||||
if (realpath(argvzero, buf)) {
|
||||
return buf;
|
||||
}
|
||||
free(buf);
|
||||
#elif defined(__APPLE__)
|
||||
char *buf = uwsgi_malloc(uwsgi.page_size);
|
||||
uint32_t len = uwsgi.page_size;
|
||||
|
||||
Reference in New Issue
Block a user