aircrack-ng / mdk4

MDK4
GNU General Public License v3.0
585 stars 106 forks source link

Error when i execute MAKE #73

Open sagaardu opened 2 years ago

sagaardu commented 2 years ago

Hello,

I get this error when execute make

root@DietPi:~/mdk4# make
make -C src clean
make[1]: Entering directory '/root/mdk4/src'
rm -f mdk4
rm -f debug.o helpers.o mac_addr.o linkedlist.o greylist.o dumpfile.o packet.o brute.o osdep.o channelhopper.o ghosting.o fragmenting.o
rm -f ../test *.o
make -C osdep clean
make[2]: Entering directory '/root/mdk4/src/osdep'
make -C radiotap clean
make[3]: Entering directory '/root/mdk4/src/osdep/radiotap'
rm -f *.o
make[3]: Leaving directory '/root/mdk4/src/osdep/radiotap'
rm -f libosdep.a  *.o .os.*
make[2]: Leaving directory '/root/mdk4/src/osdep'
make -C attacks clean
make[2]: Entering directory '/root/mdk4/src/attacks'
rm -f attacks.o auth_dos.o beacon_flood.o countermeasures.o deauth.o dummy.o eapol.o fuzzer.o ieee80211s.o poc.o probing.o wids.o *.o
make[2]: Leaving directory '/root/mdk4/src/attacks'
make[1]: Leaving directory '/root/mdk4/src'
make -C src
make[1]: Entering directory '/root/mdk4/src'
make -C osdep
make[2]: Entering directory '/root/mdk4/src/osdep'
Building for Linux
make[3]: Entering directory '/root/mdk4/src/osdep'
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk4-v2  -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -fPIC -I..    -c -o osdep.o osdep.c
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk4-v2  -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -fPIC -I..    -c -o network.o network.c
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk4-v2  -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -fPIC -I..    -c -o file.o file.c
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk4-v2  -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -fPIC -I..    -c -o linux.o linux.c
In file included from linux.c:31:
/usr/include/linux/wireless.h:15:1: error: unterminated comment
 /*
 ^
/usr/include/linux/wireless.h:11: error: unterminated #ifndef
 #ifndef _LINUX_WIRELESS_H

linux.c: In function ‘linux_get_channel’:
linux.c:386:18: error: storage size of ‘wrq’ isn’t known
     struct iwreq wrq;
                  ^~~
linux.c:390:30: error: invalid application of ‘sizeof’ to incomplete type ‘struct iwreq’
     memset( &wrq, 0, sizeof( struct iwreq ) );
                              ^~~~~~
linux.c:402:20: error: ‘SIOCGIWFREQ’ undeclared (first use in this function); did you mean ‘SIOCGIFMEM’?
     if( ioctl( fd, SIOCGIWFREQ, &wrq ) < 0 )
                    ^~~~~~~~~~~
                    SIOCGIFMEM
linux.c:402:20: note: each undeclared identifier is reported only once for each function it appears in
linux.c:386:18: warning: unused variable ‘wrq’ [-Wunused-variable]
     struct iwreq wrq;
                  ^~~
linux.c: In function ‘linux_get_freq’:
linux.c:421:18: error: storage size of ‘wrq’ isn’t known
     struct iwreq wrq;
                  ^~~
linux.c:424:30: error: invalid application of ‘sizeof’ to incomplete type ‘struct iwreq’
     memset( &wrq, 0, sizeof( struct iwreq ) );
                              ^~~~~~
linux.c:436:20: error: ‘SIOCGIWFREQ’ undeclared (first use in this function); did you mean ‘SIOCGIFMEM’?
     if( ioctl( fd, SIOCGIWFREQ, &wrq ) < 0 )
                    ^~~~~~~~~~~
                    SIOCGIFMEM
linux.c:421:18: warning: unused variable ‘wrq’ [-Wunused-variable]
     struct iwreq wrq;
                  ^~~
linux.c: In function ‘linux_set_rate’:
linux.c:455:18: error: storage size of ‘wrq’ isn’t known
     struct iwreq wrq;
                  ^~~
linux.c:514:30: error: invalid application of ‘sizeof’ to incomplete type ‘struct iwreq’
     memset( &wrq, 0, sizeof( struct iwreq ) );
                              ^~~~~~
linux.c:525:28: error: ‘SIOCSIWRATE’ undeclared (first use in this function); did you mean ‘SIOCSIFNAME’?
     if( ioctl( dev->fd_in, SIOCSIWRATE, &wrq ) < 0 )
                            ^~~~~~~~~~~
                            SIOCSIFNAME
linux.c:455:18: warning: unused variable ‘wrq’ [-Wunused-variable]
     struct iwreq wrq;
                  ^~~
linux.c: In function ‘linux_get_rate’:
linux.c:536:18: error: storage size of ‘wrq’ isn’t known
     struct iwreq wrq;
                  ^~~
linux.c:538:30: error: invalid application of ‘sizeof’ to incomplete type ‘struct iwreq’
     memset( &wrq, 0, sizeof( struct iwreq ) );
                              ^~~~~~
linux.c:549:28: error: ‘SIOCGIWRATE’ undeclared (first use in this function); did you mean ‘SIOCGIFNAME’?
     if( ioctl( dev->fd_in, SIOCGIWRATE, &wrq ) < 0 )
                            ^~~~~~~~~~~
                            SIOCGIFNAME
linux.c:536:18: warning: unused variable ‘wrq’ [-Wunused-variable]
     struct iwreq wrq;
                  ^~~
linux.c: In function ‘linux_set_channel’:
linux.c:1053:18: error: storage size of ‘wrq’ isn’t known
     struct iwreq wrq;
                  ^~~
linux.c:1116:30: error: invalid application of ‘sizeof’ to incomplete type ‘struct iwreq’
     memset( &wrq, 0, sizeof( struct iwreq ) );
                              ^~~~~~
linux.c:1123:28: error: ‘SIOCSIWFREQ’ undeclared (first use in this function); did you mean ‘SIOCSIFMEM’?
     if( ioctl( dev->fd_in, SIOCSIWFREQ, &wrq ) < 0 )
                            ^~~~~~~~~~~
                            SIOCSIFMEM
linux.c:1053:18: warning: unused variable ‘wrq’ [-Wunused-variable]
     struct iwreq wrq;
                  ^~~
linux.c: In function ‘linux_set_freq’:
linux.c:1144:18: error: storage size of ‘wrq’ isn’t known
     struct iwreq wrq;
                  ^~~
linux.c:1171:30: error: invalid application of ‘sizeof’ to incomplete type ‘struct iwreq’
     memset( &wrq, 0, sizeof( struct iwreq ) );
                              ^~~~~~
linux.c:1178:28: error: ‘SIOCSIWFREQ’ undeclared (first use in this function); did you mean ‘SIOCSIFMEM’?
     if( ioctl( dev->fd_in, SIOCSIWFREQ, &wrq ) < 0 )
                            ^~~~~~~~~~~
                            SIOCSIFMEM
linux.c:1144:18: warning: unused variable ‘wrq’ [-Wunused-variable]
     struct iwreq wrq;
                  ^~~
linux.c: In function ‘linux_get_monitor’:
linux.c:1222:18: error: storage size of ‘wrq’ isn’t known
     struct iwreq wrq;
                  ^~~
linux.c:1249:30: error: invalid application of ‘sizeof’ to incomplete type ‘struct iwreq’
     memset( &wrq, 0, sizeof( struct iwreq ) );
                              ^~~~~~
linux.c:1253:27: error: ‘SIOCGIWMODE’ undeclared (first use in this function); did you mean ‘SIOCGIFADDR’?
     if( ioctl( wi_fd(wi), SIOCGIWMODE, &wrq ) < 0 )
                           ^~~~~~~~~~~
                           SIOCGIFADDR
linux.c:1257:22: error: ‘IW_MODE_MONITOR’ undeclared (first use in this function)
         wrq.u.mode = IW_MODE_MONITOR;
                      ^~~~~~~~~~~~~~~
linux.c:1222:18: warning: unused variable ‘wrq’ [-Wunused-variable]
     struct iwreq wrq;
                  ^~~
linux.c: In function ‘set_monitor’:
linux.c:1274:18: error: storage size of ‘wrq’ isn’t known
     struct iwreq wrq;
                  ^~~
linux.c:1354:34: error: invalid application of ‘sizeof’ to incomplete type ‘struct iwreq’
         memset( &wrq, 0, sizeof( struct iwreq ) );
                                  ^~~~~~
linux.c:1357:22: error: ‘IW_MODE_MONITOR’ undeclared (first use in this function)
         wrq.u.mode = IW_MODE_MONITOR;
                      ^~~~~~~~~~~~~~~
linux.c:1359:24: error: ‘SIOCSIWMODE’ undeclared (first use in this function); did you mean ‘SIOCSIFMAP’?
         if( ioctl( fd, SIOCSIWMODE, &wrq ) < 0 )
                        ^~~~~~~~~~~
                        SIOCSIFMAP
linux.c:1274:18: warning: unused variable ‘wrq’ [-Wunused-variable]
     struct iwreq wrq;
                  ^~~
linux.c: In function ‘openraw’:
linux.c:1406:18: error: storage size of ‘wrq’ isn’t known
     struct iwreq wrq;
                  ^~~
linux.c:1407:18: error: storage size of ‘wrq2’ isn’t known
     struct iwreq wrq2;
                  ^~~~
linux.c:1443:35: error: invalid application of ‘sizeof’ to incomplete type ‘struct iwreq’
         memset( &wrq2, 0, sizeof( struct iwreq ) );
                                   ^~~~~~
linux.c:1447:34: error: ‘SIOCGIWMODE’ undeclared (first use in this function); did you mean ‘SIOCGIFADDR’?
         if( ioctl( dev->fd_main, SIOCGIWMODE, &wrq2 ) < 0 )
                                  ^~~~~~~~~~~
                                  SIOCGIFADDR
linux.c:1452:23: error: ‘IW_MODE_INFRA’ undeclared (first use in this function); did you mean ‘IP_NODEFRAG’?
         wrq2.u.mode = IW_MODE_INFRA;
                       ^~~~~~~~~~~~~
                       IP_NODEFRAG
linux.c:1453:34: error: ‘SIOCSIWMODE’ undeclared (first use in this function); did you mean ‘SIOCSIFMAP’?
         if( ioctl( dev->fd_main, SIOCSIWMODE, &wrq2 ) < 0 )
                                  ^~~~~~~~~~~
                                  SIOCSIFMAP
linux.c:1497:30: error: invalid application of ‘sizeof’ to incomplete type ‘struct iwreq’
     memset( &wrq, 0, sizeof( struct iwreq ) );
                              ^~~~~~
linux.c:1505:22: error: ‘IW_MODE_MONITOR’ undeclared (first use in this function)
         wrq.u.mode = IW_MODE_MONITOR;
                      ^~~~~~~~~~~~~~~
linux.c:1513:63: warning: comparison of constant ‘6’ with boolean expression is always false [-Wbool-compare]
         if (set_monitor( dev, iface, fd ) && !dev->drivertype == DT_ORINOCO )
                                                               ^~
linux.c:1513:63: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
linux.c:1513:46: note: add parentheses around left hand side expression to silence this warning
         if (set_monitor( dev, iface, fd ) && !dev->drivertype == DT_ORINOCO )
                                              ^~~~~~~~~~~~~~~~
                                              (               )
linux.c:1523:67: warning: comparison of constant ‘6’ with boolean expression is always false [-Wbool-compare]
             if (set_monitor( dev, iface, fd ) && !dev->drivertype == DT_ORINOCO )
                                                                   ^~
linux.c:1523:67: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
linux.c:1523:50: note: add parentheses around left hand side expression to silence this warning
             if (set_monitor( dev, iface, fd ) && !dev->drivertype == DT_ORINOCO )
                                                  ^~~~~~~~~~~~~~~~
                                                  (               )
linux.c:1407:18: warning: unused variable ‘wrq2’ [-Wunused-variable]
     struct iwreq wrq2;
                  ^~~~
linux.c:1406:18: warning: unused variable ‘wrq’ [-Wunused-variable]
     struct iwreq wrq;
                  ^~~
linux.c: In function ‘linux_get_rate’:
linux.c:555:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
At top level:
linux.c:2057:13: warning: ‘linux_close’ defined but not used [-Wunused-function]
 static void linux_close(struct wif *wi)
             ^~~~~~~~~~~
linux.c:946:12: warning: ‘linux_set_channel_nl80211’ defined but not used [-Wunused-function]
 static int linux_set_channel_nl80211(struct wif *wi, int channel)
            ^~~~~~~~~~~~~~~~~~~~~~~~~
linux.c:314:12: warning: ‘linux_nl80211_init’ defined but not used [-Wunused-function]
 static int linux_nl80211_init(struct nl80211_state *state)
            ^~~~~~~~~~~~~~~~~~
make[3]: *** [<builtin>: linux.o] Error 1
make[3]: Leaving directory '/root/mdk4/src/osdep'
make[2]: *** [Makefile:33: all] Error 2
make[2]: Leaving directory '/root/mdk4/src/osdep'
make[1]: *** [Makefile:28: osd] Error 2
make[1]: Leaving directory '/root/mdk4/src'
make: *** [Makefile:10: all] Error 2