1) use config.h if available
authorewt <devnull@localhost>
Fri, 17 Jan 1997 16:21:51 +0000 (16:21 +0000)
committerewt <devnull@localhost>
Fri, 17 Jan 1997 16:21:51 +0000 (16:21 +0000)
2) use if not ifdef
3) typevase getpid() to int for printf()

CVS patchset: 1314
CVS date: 1997/01/17 16:21:51

lib/verify.c

index d93ae2f..bac18a2 100644 (file)
@@ -1,4 +1,6 @@
-#ifdef HAVE_ALLOCA_H
+#include "config.h"
+
+#if HAVE_ALLOCA_H
 # include <alloca.h>
 #endif
 
@@ -157,7 +159,7 @@ int rpmVerifyScript(char * root, Header h, int err) {
     }
 
     fn = alloca(strlen(tmpdir) + 20);
-    sprintf(fn, "%s/rpm-%d.vscript", tmpdir, getpid());
+    sprintf(fn, "%s/rpm-%d.vscript", tmpdir, (int) getpid());
 
     rpmMessage(RPMMESS_DEBUG, "verify script found - "
                "running from file %s\n", fn);