termux-packages/packages/procps/progname.patch

26 lines
702 B
Diff

--- ../procps-3.3.17/configure.ac 2021-02-09 11:11:25.000000000 +0100
+++ ./configure.ac 2021-05-08 20:36:49.085413472 +0200
@@ -116,6 +116,22 @@
AC_CHECK_HEADERS(stdio_ext.h, [], [], AC_INCLUDES_DEFAULT)
+AC_MSG_CHECKING(for __progname)
+AC_LINK_IFELSE([AC_LANG_SOURCE(
+ [
+ #include <stdio.h>
+ #include <stdlib.h>
+ extern char *__progname;
+ int main(void) {
+ const char *cp = __progname;
+ printf("%s\n", cp);
+ exit(0);
+ }
+ ])],
+ AC_DEFINE(HAVE___PROGNAME, 1, [Define if __progname exists])
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no))
+
AC_MSG_CHECKING(whether program_invocation_name is defined)
AC_TRY_COMPILE([#include <errno.h>],
[program_invocation_name = "test";],