summaryrefslogtreecommitdiff
path: root/data/libpipeline/program_name.diff
blob: f9d92c542187f7c1297eba18808ced61c325f749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff -ur libpipeline-1.5.0/gnulib/lib/error.c libpipeline-1.5.0+iPhone/gnulib/lib/error.c
--- libpipeline-1.5.0/gnulib/lib/error.c	2014-08-03 03:31:22.000000000 -1000
+++ libpipeline-1.5.0+iPhone/gnulib/lib/error.c	2018-12-14 11:20:28.000000000 -1000
@@ -110,9 +110,13 @@
 #  endif
 # endif
 
+#if defined __APPLE__ && defined __MACH__
+#define program_name (((char **)*_NSGetArgv())[0])
+#else
 /* The calling program should define program_name and set it to the
    name of the executing program.  */
 extern char *program_name;
+#endif
 
 # if HAVE_STRERROR_R || defined strerror_r
 #  define __strerror_r strerror_r