freebsd-ports/converters/fix-mime-charset/files/patch-src_argp-local.h
Jan Beich efec6e852f converters/fix-mime-charset: unbreak with libc++ 3.9
./argp-local.h:69:7: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
char *p=strrchr(arg,'/');
      ^ ~~~~~~~~~~~~~~~~

Reported by:	pkg-fallout
2017-02-01 20:21:01 +00:00

19 lines
416 B
C++

--- src/argp-local.h.orig 2003-11-25 23:51:41 UTC
+++ src/argp-local.h
@@ -12,6 +12,7 @@
#include <getopt.h>
#include <string.h>
#include <iostream>
+#include <cstdlib>
#define __need_error_t
#include <errno.h>
@@ -65,7 +65,7 @@ const argp_option _argp_default_options[
string _argp_progname(const char *arg)
{
-char *p=strrchr(arg,'/');
+const char *p=strrchr(arg,'/');
return p==NULL ? arg : p+1;
}