execlp sentinel
Another thing I ran into when porting cogito-0.11.3 to OpenBSD... the NULL last argument to execlp() must be cast to a pointer type (NULL is an integer type on OpenBSD) in order for it to match as being a proper sentinel value.
--Jason L. Wright
diff.c renamed from diff.c.orig +2 -2
@@ -157,7 +157,7 @@ static void builtin_diff(const char *namexit (0 ); }fflush (NULL ); -execlp ("/bin/sh" ,"sh" ,"-c" , cmd,NULL ); +execlp ("/bin/sh" ,"sh" ,"-c" , cmd, (void *)NULL ); }struct diff_filespec *alloc_filespec (const char *path)
@@ -518,7 +518,7 @@ static void run_external_diff(const charexecvp (pgm, (char *const *) exec_arg); }else -execlp (pgm, pgm, name,NULL ); +execlp (pgm, pgm, name, (void *)NULL ); }/* * otherwise we use the built-in one.
merge-cache.c renamed from merge-cache.c.orig +1 -1
@@ -23,7 +23,7 @@ static void run_program(void) arguments[5 ], arguments[6 ], arguments[7 ], - NULL); + (void *)NULL);die ("unable to execute '%s'" , pgm); }if (waitpid (pid, &status,0 ) <0 || !WIFEXITED (status) ||WEXITSTATUS (status)) {
rsh.c renamed from rsh.c.orig +1 -1
@@ -57,7 +57,7 @@ int setup_connection(int *fd_in, int *fdclose (sv[1 ]);dup2 (sv[0 ],0 );dup2 (sv[0 ],1 ); -execlp ("ssh" ,"ssh" , host, command,NULL ); +execlp ("ssh" ,"ssh" , host, command, (void *)NULL ); }close (sv[0 ]); *fd_in = sv[1 ];