changeset 1230:60fb2b1b6220

Cast NULL sentinel to (char*) for execl (fix for LP64 arch).
author Jorge Arellano Cid <jcid@dillo.org>
date Thu, 16 Jul 2009 09:26:21 -0400
parents bb220d0d545b
children 4167a56fc6aa
files dpid/main.c src/IO/dpi.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dpid/main.c	Wed Jul 15 14:34:59 2009 -0400
+++ b/dpid/main.c	Thu Jul 16 09:26:21 2009 -0400
@@ -68,7 +68,7 @@
    }
    if (pid == 0) {
       /* Child, start plugin */
-      if (execl(dpi_attr.path, dpi_attr.path, NULL) == -1) {
+      if (execl(dpi_attr.path, dpi_attr.path, (char*)NULL) == -1) {
          ERRMSG("start_plugin", "execl", errno);
          MSG_ERR("ERROR in child proc for %s\n", dpi_attr.path);
          exit(1);
@@ -100,7 +100,7 @@
       MSG_ERR("ERROR in child proc for %s\n", dpi_attr.path);
       exit(1);
    }
-   if (execl(dpi_attr.path, dpi_attr.path, NULL) == -1) {
+   if (execl(dpi_attr.path, dpi_attr.path, (char*)NULL) == -1) {
       ERRMSG("start_plugin", "execl", errno);
       MSG_ERR("ERROR in child proc for %s\n", dpi_attr.path);
       exit(1);
--- a/src/IO/dpi.c	Wed Jul 15 14:34:59 2009 -0400
+++ b/src/IO/dpi.c	Thu Jul 16 09:26:21 2009 -0400
@@ -299,9 +299,9 @@
       /* This is the child process.  Execute the command. */
       char *path1 = dStrconcat(dGethomedir(), "/.dillo/dpid", NULL);
       Dpi_close_fd(st_pipe[0]);
-      if (execl(path1, "dpid", NULL) == -1) {
+      if (execl(path1, "dpid", (char*)NULL) == -1) {
          dFree(path1);
-         if (execlp("dpid", "dpid", NULL) == -1) {
+         if (execlp("dpid", "dpid", (char*)NULL) == -1) {
             MSG("Dpi_start_dpid (child): %s\n", dStrerror(errno));
             do
                n = write(st_pipe[1], "ERROR", 5);