summaryrefslogtreecommitdiff
path: root/print/LPRng-core/patches/patch-ai
blob: ec5d9393482aca2d8a1f4e29ad18c0396238cbc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-ai,v 1.1 2007/07/31 19:22:10 rillig Exp $

PR: 36713

POSIX requires that each program gets at least argv[0]. This fixes the
following gcc4 warning:

./common/lpq.c:452: warning: not enough variable arguments to fit a sentinel

--- src/common/lpq.c.orig	2004-09-24 22:19:58.000000000 +0200
+++ src/common/lpq.c	2007-07-31 21:15:24.000000000 +0200
@@ -449,7 +449,7 @@ void Term_clear()
 	if( (pid = dofork(0)) == 0 ){
 		setuid( OriginalRUID );
 		close_on_exec(3);
-		execl(CLEAR,0);
+		execl(CLEAR, CLEAR, (char *)0);
 		exit(1);
 	} else if( pid < 0 ){
 		LOGERR_DIE(LOG_ERR) _("fork() failed") );