aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libmain/shared.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 7d888202b..1445c8f03 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -263,7 +263,7 @@ void showManPage(const string & name)
{
restoreSignals();
setenv("MANPATH", settings.nixManDir.c_str(), 1);
- execlp("man", "man", name.c_str(), NULL);
+ execlp("man", "man", name.c_str(), (char *)NULL);
throw SysError(format("command 'man %1%' failed") % name.c_str());
}
@@ -325,10 +325,10 @@ RunPager::RunPager()
setenv("LESS", "FRSXMK", 1);
restoreSignals();
if (pager)
- execl("/bin/sh", "sh", "-c", pager, NULL);
- execlp("pager", "pager", NULL);
- execlp("less", "less", NULL);
- execlp("more", "more", NULL);
+ execl("/bin/sh", "sh", "-c", pager, (char *)NULL);
+ execlp("pager", "pager", (char *)NULL);
+ execlp("less", "less", (char *)NULL);
+ execlp("more", "more", (char *)NULL);
throw SysError(format("executing '%1%'") % pager);
});