diff --git a/spamc/Makefile.win b/spamc/Makefile.win index 0093290e0..f12db11e8 100644 --- a/spamc/Makefile.win +++ b/spamc/Makefile.win @@ -19,8 +19,11 @@ all: spamc$(EXEEXT) $(SRCDIR)/spamc$(EXEEXT): - cd $(SRCDIR) - $(MAKE) spamc$(EXEEXT) +# Bug #7617: Both commands must be on the same line because for every +# line a new sub-shell is spawned. The change of directory would be +# "forgotten" before the next command is executed, if the commands +# were on different lines. + cd $(SRCDIR) && $(MAKE) spamc$(EXEEXT) spamc$(EXEEXT): $(SPAMC_FILES) $(LIBSPAMC_FILES) diff --git a/spamc/getopt.c b/spamc/getopt.c index e8776e7e1..d2982733d 100644 --- a/spamc/getopt.c +++ b/spamc/getopt.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "getopt.h" #ifdef WIN32 @@ -246,7 +246,8 @@ spamc_getopt_long(int argc, char * const argv[], if((bp = strchr(longopt, '='))) { opt = strdup(bp+1); if (opt == NULL) { - err(1, NULL); + fprintf(stderr, "%s: %s\n", argv[0], strerror(errno)); + exit(1); } longoptlen -= strlen(bp); }