[PR PATCH] [Closed]: Fix crackcheck Makefile to allow building on Ubuntu
github at samba.org
github at samba.org
Thu Dec 14 20:43:51 UTC 2017
There's a closed pull request on the Samba Samba Github repository
Fix crackcheck Makefile to allow building on Ubuntu
https://github.com/samba-team/samba/pull/114
Description: This patch fixes the following failure when attempting to build crackcheck under Ubuntu 16.04:
~~~
# make
gcc -O2 -c -o crackcheck.o crackcheck.c
crackcheck.c: In function âmainâ:
crackcheck.c:91:15: warning: implicit declaration of function âgetoptâ [-Wimplicit-function-declaratio
while ( (c = getopt(argc, argv, "d:cs")) != EOF){
^
gcc -O2 -lcrack -o crackcheck crackcheck.o
crackcheck.o: In function `main':
crackcheck.c:(.text.startup+0xee): undefined reference to `FascistCheck'
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'crackcheck' failed
make: *** [crackcheck] Error 1
~~~
It just needs the `-lcrack` option to be moved to the end of the command line. Also adds `#include <unistd.h>` to silence the getopt warning.
More information about the samba-technical
mailing list