patch for bsd-airtools on recent -current
Eugene
eugene3 at web.de
Sun Aug 15 21:27:22 PDT 2004
hi,
i noticed the port net-mgmt/bsd-airutils doesnt build on a recent
-current... maybe because the new gcc 3.4.2 version... so took a look at
it, and patched it to compile again without any errors or warnings...
the error is/was:
-- cut --
gcc -Wall -g -I/usr/local/include -O2 -c weakksa.c
weakksa.c: In function `weakksacrack':
weakksa.c:172: error: label at end of compound statement
*** Error code 1
Stop in
/usr/ports/net-mgmt/bsd-airtools/work/bsd-airtools/dweputils/dwepcrack.
*** Error code 1
Stop in /usr/ports/net-mgmt/bsd-airtools.
-- cut --
the patch is:
-- cut --
diff -urN bsd-airtools/dstumbler/dstumbler.h
bsd-airtools-0.3.1/dstumbler/dstumbler.h
--- bsd-airtools/dstumbler/dstumbler.h Sun Jul 20 10:13:52 2003
+++ bsd-airtools-0.3.1/dstumbler/dstumbler.h Mon Aug 16 05:49:19 2004
@@ -244,7 +244,6 @@
#ifdef __FreeBSD__
#define htole16(x) (x)
#define le16toh(x) (x)
-#define O_SYNC O_FSYNC
#else
#ifdef __OpenBSD__
#define le16toh(x) letoh16(x)
diff -urN bsd-airtools/dweputils/dwepcrack/weakksa.c
bsd-airtools-0.3.1/dweputils/dwepcrack/weakksa.c
--- bsd-airtools/dweputils/dwepcrack/weakksa.c Sun Jul 20 07:43:59 2003
+++ bsd-airtools-0.3.1/dweputils/dwepcrack/weakksa.c Mon Aug 16
05:51:48 2004
@@ -161,14 +161,13 @@
(B != 0 && !(B % 2) ? (x == 1 && y == (B / 2) + 1) ||
(x == (B / 2) + 2 && y == (N - 1) - x) : 0))
{
- if(BITSET(sample_check[x][y], z))
- goto fail;
- SETBIT(sample_check[x][y], z);
+ if(!BITSET(sample_check[x][y], z))
+ {
+ SETBIT(sample_check[x][y], z);
- memcpy(samples[B].s[samples[B].len].iv, iv, IV_SIZE);
- samples[B].s[samples[B].len++].byte = iv[4] ^ 0xaa;
-
- fail:
+ memcpy(samples[B].s[samples[B].len].iv, iv, IV_SIZE);
+ samples[B].s[samples[B].len++].byte = iv[4] ^ 0xaa;
+ }
}
}
}
diff -urN bsd-airtools/dweputils/dwepcrack/wordfile.c
bsd-airtools-0.3.1/dweputils/dwepcrack/wordfile.c
--- bsd-airtools/dweputils/dwepcrack/wordfile.c Sun Jul 20 07:09:26 2003
+++ bsd-airtools-0.3.1/dweputils/dwepcrack/wordfile.c Mon Aug 16
05:52:39 2004
@@ -42,6 +42,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
+#include <stdlib.h>
#include "dwepcrack.h"
diff -urN bsd-airtools/prism2dump/fields_mgmt.c
bsd-airtools-0.3.1/prism2dump/fields_mgmt.c
--- bsd-airtools/prism2dump/fields_mgmt.c Sun Jul 20 10:19:39 2003
+++ bsd-airtools-0.3.1/prism2dump/fields_mgmt.c Mon Aug 16 05:55:34 2004
@@ -36,6 +36,7 @@
*/
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include <pcap.h>
-- cut --
patch should be save, because in fcntl.h i see:
#define O_FSYNC 0x0080 /* synchronous writes */
#define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */
hope i did it the right way :-/
enjoy,
Eugene
More information about the freebsd-ports
mailing list