Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

../portable_endian.h:50: warning: "htole64" redefined>>on musl mips #63

Open
bxcrs opened this issue Oct 10, 2019 · 4 comments
Open

../portable_endian.h:50: warning: "htole64" redefined>>on musl mips #63

bxcrs opened this issue Oct 10, 2019 · 4 comments

Comments

@bxcrs
Copy link
Contributor

bxcrs commented Oct 10, 2019

../portable_endian.h:39: warning: "htobe16" redefined
39 | # define htobe16(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:60: note: this is the location of the previous definition
60 | #define htobe16(x) (uint16_t)(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:40: warning: "htole16" redefined
40 | # define htole16(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:69: note: this is the location of the previous definition
69 | #define htole16(x) __bswap16(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:41: warning: "be16toh" redefined
41 | # define be16toh(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:61: note: this is the location of the previous definition
61 | #define be16toh(x) (uint16_t)(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:42: warning: "le16toh" redefined
42 | # define le16toh(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:70: note: this is the location of the previous definition
70 | #define le16toh(x) __bswap16(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:44: warning: "htobe32" redefined
44 | # define htobe32(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:63: note: this is the location of the previous definition
63 | #define htobe32(x) (uint32_t)(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:45: warning: "htole32" redefined
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:72: note: this is the location of the previous definition
72 | #define htole32(x) __bswap32(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:46: warning: "be32toh" redefined
46 | # define be32toh(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:64: note: this is the location of the previous definition
64 | #define be32toh(x) (uint32_t)(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:47: warning: "le32toh" redefined
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:73: note: this is the location of the previous definition
73 | #define le32toh(x) __bswap32(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:49: warning: "htobe64" redefined
49 | # define htobe64(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:66: note: this is the location of the previous definition
66 | #define htobe64(x) (uint64_t)(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:50: warning: "htole64" redefined
50 | # define htole64(x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:75: note: this is the location of the previous definition
75 | #define htole64(x) __bswap64(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:51: warning: "be64toh" redefined
51 | # define be64toh(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:67: note: this is the location of the previous definition
67 | #define be64toh(x) (uint64_t)(x)
|
In file included from ncrack_smb2.cc:137:
../portable_endian.h:52: warning: "le64toh" redefined
52 | # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ../nbase/nbase.h:195,
from ../ncrack.h:161,
from ncrack_smb2.cc:130:
/mips-linux-musl/include/endian.h:76: note: this is the location of the previous definition
76 | #define le64toh(x) __bswap64(x)
|
In file included from ncrack_smb2.cc:137:
ncrack_smb2.cc: In function 'void encode_le64(Buf*, uint64_t)':
../portable_endian.h:50:132: warning: left shift count >= width of type [-Wshift-count-overflow]
50 | x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32))
| ^~

ncrack_smb2.cc:232:18: note: in expansion of macro 'htole64'
232 | uint64_t u64 = htole64(n);
| ^~~~~~~
ncrack_smb2.cc:232:28: error: expected ')' before ';' token
232 | uint64_t u64 = htole64(n);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:50:91: note: to match this '('
50 | # define htole64(x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32))
| ^
ncrack_smb2.cc:232:18: note: in expansion of macro 'htole64'
232 | uint64_t u64 = htole64(n);
| ^~~~~~~
ncrack_smb2.cc:232:28: error: expected ')' before ';' token
232 | uint64_t u64 = htole64(n);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
../portable_endian.h:50:43: note: in expansion of macro 'htole32'
50 | # define htole64(x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32))
| ^~~~~~~
ncrack_smb2.cc:232:18: note: in expansion of macro 'htole64'
232 | uint64_t u64 = htole64(n);
| ^~~~~~~
ncrack_smb2.cc:232:28: error: expected ')' before ';' token
232 | uint64_t u64 = htole64(n);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:50:32: note: to match this '('
50 | # define htole64(x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32))
| ^
ncrack_smb2.cc:232:18: note: in expansion of macro 'htole64'
232 | uint64_t u64 = htole64(n);
| ^~~~~~~
ncrack_smb2.cc:232:28: error: expected ')' before ';' token
232 | uint64_t u64 = htole64(n);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:50:31: note: to match this '('
50 | # define htole64(x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32))
| ^
ncrack_smb2.cc:232:18: note: in expansion of macro 'htole64'
232 | uint64_t u64 = htole64(n);
| ^~~~~~~
ncrack_smb2.cc: In function 'void encode_le32(Buf*, uint32_t)':
ncrack_smb2.cc:236:28: error: expected ')' before ';' token
236 | uint32_t u32 = htole32(n);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ncrack_smb2.cc:236:18: note: in expansion of macro 'htole32'
236 | uint32_t u32 = htole32(n);
| ^~~~~~~
ncrack_smb2.cc:236:28: error: expected ')' before ';' token
236 | uint32_t u32 = htole32(n);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ncrack_smb2.cc:236:18: note: in expansion of macro 'htole32'
236 | uint32_t u32 = htole32(n);
| ^~~~~~~
ncrack_smb2.cc: In function 'void encode_le16(Buf*, uint16_t)':
ncrack_smb2.cc:240:28: error: expected ')' before ';' token
240 | uint16_t u16 = htole16(n);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:40:31: note: to match this '('
40 | # define htole16(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))
| ^
ncrack_smb2.cc:240:18: note: in expansion of macro 'htole16'
240 | uint16_t u16 = htole16(n);
| ^~~~~~~
ncrack_smb2.cc: In function 'void smb2_encode_sessetup_req(Connection*, unsigned char*, uint16_t)':
ncrack_smb2.cc:317:49: error: expected ')' before ';' token
317 | *sec_off = htole16(con->outbuf->get_len() - 4);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:40:31: note: to match this '('
40 | # define htole16(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))
| ^
ncrack_smb2.cc:317:14: note: in expansion of macro 'htole16'
317 | sec_off = htole16(con->outbuf->get_len() - 4);
| ^~~~~~~
ncrack_smb2.cc: In function 'uint32_t smb2_get_status(Connection
)':
ncrack_smb2.cc:326:21: error: expected ')' before ';' token
326 | return le32toh(p);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:47:32: note: to match this '('
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
| ^
ncrack_smb2.cc:326:10: note: in expansion of macro 'le32toh'
326 | return le32toh(p);
| ^~~~~~~
ncrack_smb2.cc:326:21: error: expected ')' before ';' token
326 | return le32toh(p);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:47:31: note: to match this '('
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
| ^
ncrack_smb2.cc:326:10: note: in expansion of macro 'le32toh'
326 | return le32toh(p);
| ^~~~~~~
ncrack_smb2.cc: In function 'void smb2_get_sessetup_sec_buf(Connection
, unsigned char
, uint16_t
)':
ncrack_smb2.cc:335:53: error: expected ')' before ';' token
335 | buf = (unsigned char)(start + le16toh(*sec_off));
| ~ ^
| )
ncrack_smb2.cc:336:27: error: expected ')' before ';' token
336 | *len = le16toh(*sec_len);
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:42:31: note: to match this '('
42 | # define le16toh(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))
| ^
ncrack_smb2.cc:336:10: note: in expansion of macro 'le16toh'
336 | *len = le16toh(sec_len);
| ^~~~~~~
ncrack_smb2.cc: In function 'uint64_t smb2_get_ses_id(Connection
)':
../portable_endian.h:52:132: warning: left shift count >= width of type [-Wshift-count-overflow]
52 | x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32))
| ^~

ncrack_smb2.cc:342:10: note: in expansion of macro 'le64toh'
342 | return le64toh(((uint64_t)(start+4+2+2+4+2+2+4+4+8+4+4)));
| ^~~~~~~
ncrack_smb2.cc:342:62: error: expected ')' before ';' token
342 | return le64toh(((uint64_t)(start+4+2+2+4+2+2+4+4+8+4+4)));
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:52:91: note: to match this '('
52 | # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32))
| ^
ncrack_smb2.cc:342:10: note: in expansion of macro 'le64toh'
342 | return le64toh(((uint64_t)(start+4+2+2+4+2+2+4+4+8+4+4)));
| ^~~~~~~
ncrack_smb2.cc:342:62: error: expected ')' before ';' token
342 | return le64toh(((uint64_t)(start+4+2+2+4+2+2+4+4+8+4+4)));
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:47:31: note: to match this '('
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
| ^
../portable_endian.h:52:43: note: in expansion of macro 'le32toh'
52 | # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32))
| ^~~~~~~
ncrack_smb2.cc:342:10: note: in expansion of macro 'le64toh'
342 | return le64toh(((uint64_t)(start+4+2+2+4+2+2+4+4+8+4+4)));
| ^~~~~~~
ncrack_smb2.cc:342:62: error: expected ')' before ';' token
342 | return le64toh(((uint64_t)(start+4+2+2+4+2+2+4+4+8+4+4)));
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:52:32: note: to match this '('
52 | # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32))
| ^
ncrack_smb2.cc:342:10: note: in expansion of macro 'le64toh'
342 | return le64toh(((uint64_t)(start+4+2+2+4+2+2+4+4+8+4+4)));
| ^~~~~~~
ncrack_smb2.cc:342:62: error: expected ')' before ';' token
342 | return le64toh(((uint64_t)(start+4+2+2+4+2+2+4+4+8+4+4)));
| ^
In file included from ncrack_smb2.cc:137:
../portable_endian.h:52:31: note: to match this '('
52 | # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32))
| ^
ncrack_smb2.cc:342:10: note: in expansion of macro 'le64toh'
342 | return le64toh(((uint64_t)(start+4+2+2+4+2+2+4+4+8+4+4)));
| ^~~~~~~
make[1]: *** [Makefile:17: ncrack_smb2.o] Error 1
make[1]: Leaving directory '/workspace/ncrack-0.7/modules'
make: *** [Makefile:75: modules_build] Error 2
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing ncrack.cc -o ncrack.o
ncrack.cc: In function 'void lookup_init(const char*)':
ncrack.cc:329:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'global_service' {aka 'struct global_service'} with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
329 | memset(&temp, 0, sizeof(temp));
| ^
In file included from ncrack.h:266,
from ncrack.cc:133:
global_structures.h:170:16: note: 'global_service' {aka 'struct global_service'} declared here
170 | typedef struct global_service {
| ^~~~~~~~~~~~~~
ncrack.cc: In function 'void ncrack_connect_handler(nsock_pool, nsock_event, void*)':
ncrack.cc:2298:34: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'long int' [-Wsign-compare]
2298 | if (serv->failed_connections > serv->connection_retries) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing utils.cc -o utils.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing TargetGroup.cc -o TargetGroup.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing Target.cc -o Target.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing targets.cc -o targets.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing NcrackOps.cc -o NcrackOps.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing Service.cc -o Service.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing ServiceGroup.cc -o ServiceGroup.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing Connection.cc -o Connection.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing services.cc -o services.o
services.cc: In function 'global_service parse_services_options(char*)':
services.cc:712:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'global_service' {aka 'struct global_service'} with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
712 | memset(&temp, 0, sizeof(temp));
| ^
In file included from services.h:135,
from services.cc:132:
global_structures.h:170:16: note: 'global_service' {aka 'struct global_service'} declared here
170 | typedef struct global_service {
| ^~~~~~~~~~~~~~
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing timing.cc -o timing.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing ncrack_error.cc -o ncrack_error.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing output.cc -o output.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing ncrack_tty.cc -o ncrack_tty.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing Buf.cc -o Buf.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing NcrackOutputTable.cc -o NcrackOutputTable.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing ncrack_input.cc -o ncrack_input.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing ncrack_resume.cc -o ncrack_resume.o
ncrack_resume.cc: In function 'int ncrack_resume(char*, int*, char***)':
ncrack_resume.cc:477:10: warning: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying 7 bytes from a string of the same length [-Wstringop-truncation]
477 | strncpy(ncrack_arg_buffer, "ncrack ", 7);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing crypto.cc -o crypto.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing http.cc -o http.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing http_digest.cc -o http_digest.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing xml.cc -o xml.o
g++ -c -I/workspace/openssl-lib/include -I/workspace/zlib-lib/include -Inbase -Insock/include -Iopensshlib -Imodules -DHAVE_CONFIG_H -DNCRACK_NAME="Ncrack" -DNCRACK_URL="http://ncrack.org\" -DNCRACK_PLATFORM="mips-unknown-elf" -DNCRACKDATADIR="/workspace/ncrack-lib/share/ncrack" -D_FORTIFY_SOURCE=2 -O2 -Wall -fno-strict-aliasing ntlmssp.cc -o ntlmssp.o
In file included from ntlmssp.cc:164:
portable_endian.h:39: warning: "htobe16" redefined
39 | # define htobe16(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:60: note: this is the location of the previous definition
60 | #define htobe16(x) (uint16_t)(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:40: warning: "htole16" redefined
40 | # define htole16(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:69: note: this is the location of the previous definition
69 | #define htole16(x) __bswap16(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:41: warning: "be16toh" redefined
41 | # define be16toh(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:61: note: this is the location of the previous definition
61 | #define be16toh(x) (uint16_t)(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:42: warning: "le16toh" redefined
42 | # define le16toh(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:70: note: this is the location of the previous definition
70 | #define le16toh(x) __bswap16(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:44: warning: "htobe32" redefined
44 | # define htobe32(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:63: note: this is the location of the previous definition
63 | #define htobe32(x) (uint32_t)(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:45: warning: "htole32" redefined
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:72: note: this is the location of the previous definition
72 | #define htole32(x) __bswap32(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:46: warning: "be32toh" redefined
46 | # define be32toh(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:64: note: this is the location of the previous definition
64 | #define be32toh(x) (uint32_t)(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:47: warning: "le32toh" redefined
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:73: note: this is the location of the previous definition
73 | #define le32toh(x) __bswap32(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:49: warning: "htobe64" redefined
49 | # define htobe64(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:66: note: this is the location of the previous definition
66 | #define htobe64(x) (uint64_t)(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:50: warning: "htole64" redefined
50 | # define htole64(x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:75: note: this is the location of the previous definition
75 | #define htole64(x) __bswap64(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:51: warning: "be64toh" redefined
51 | # define be64toh(x) (x)
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:67: note: this is the location of the previous definition
67 | #define be64toh(x) (uint64_t)(x)
|
In file included from ntlmssp.cc:164:
portable_endian.h:52: warning: "le64toh" redefined
52 | # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32))
|
In file included from /mips-linux-musl/include/sys/types.h:70,
from ntlmssp.cc:156:
/mips-linux-musl/include/endian.h:76: note: this is the location of the previous definition
76 | #define le64toh(x) __bswap64(x)
|
ntlmssp.cc: In function 'int ntlm_negotiate_message(auth_data*)':
ntlmssp.cc:285:35: error: expected ')' before ';' token
285 | u32 = htole32(NEGOTIATE_MESSAGE);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:285:9: note: in expansion of macro 'htole32'
285 | u32 = htole32(NEGOTIATE_MESSAGE);
| ^~~~~~~
ntlmssp.cc:285:35: error: expected ')' before ';' token
285 | u32 = htole32(NEGOTIATE_MESSAGE);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:285:9: note: in expansion of macro 'htole32'
285 | u32 = htole32(NEGOTIATE_MESSAGE);
| ^~~~~~~
ntlmssp.cc:294:33: error: expected ')' before ';' token
294 | NTLMSSP_NEGOTIATE_UNICODE);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:288:9: note: in expansion of macro 'htole32'
288 | u32 = htole32(NTLMSSP_NEGOTIATE_56|NTLMSSP_NEGOTIATE_128|
| ^~~~~~~
ntlmssp.cc:294:33: error: expected ')' before ';' token
294 | NTLMSSP_NEGOTIATE_UNICODE);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:288:9: note: in expansion of macro 'htole32'
288 | u32 = htole32(NTLMSSP_NEGOTIATE_56|NTLMSSP_NEGOTIATE_128|
| ^~~~~~~
ntlmssp.cc: In function 'int encode_ntlm_auth(auth_data*, char*)':
ntlmssp.cc:451:47: error: expected ')' before ';' token
451 | server_neg_flags = le32toh(server_neg_flags);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:47:32: note: to match this '('
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:451:22: note: in expansion of macro 'le32toh'
451 | server_neg_flags = le32toh(server_neg_flags);
| ^~~~~~~
ntlmssp.cc:451:47: error: expected ')' before ';' token
451 | server_neg_flags = le32toh(server_neg_flags);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:47:31: note: to match this '('
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:451:22: note: in expansion of macro 'le32toh'
451 | server_neg_flags = le32toh(server_neg_flags);
| ^~~~~~~
ntlmssp.cc:454:21: error: expected ')' before ';' token
454 | u32 = le32toh(u32);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:47:32: note: to match this '('
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:454:9: note: in expansion of macro 'le32toh'
454 | u32 = le32toh(u32);
| ^~~~~~~
ntlmssp.cc:454:21: error: expected ')' before ';' token
454 | u32 = le32toh(u32);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:47:31: note: to match this '('
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:454:9: note: in expansion of macro 'le32toh'
454 | u32 = le32toh(u32);
| ^~~~~~~
ntlmssp.cc:458:21: error: expected ')' before ';' token
458 | u32 = le32toh(u32);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:47:32: note: to match this '('
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:458:9: note: in expansion of macro 'le32toh'
458 | u32 = le32toh(u32);
| ^~~~~~~
ntlmssp.cc:458:21: error: expected ')' before ';' token
458 | u32 = le32toh(u32);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:47:31: note: to match this '('
47 | # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:458:9: note: in expansion of macro 'le32toh'
458 | u32 = le32toh(u32);
| ^~~~~~~
ntlmssp.cc:488:40: error: expected ')' before ';' token
488 | u32 = htole32(AUTHENTICATION_MESSAGE);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:488:9: note: in expansion of macro 'htole32'
488 | u32 = htole32(AUTHENTICATION_MESSAGE);
| ^~~~~~~
ntlmssp.cc:488:40: error: expected ')' before ';' token
488 | u32 = htole32(AUTHENTICATION_MESSAGE);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:488:9: note: in expansion of macro 'htole32'
488 | u32 = htole32(AUTHENTICATION_MESSAGE);
| ^~~~~~~
ntlmssp.cc:495:28: error: expected ')' before ';' token
495 | u32 = htole32(0x00180018);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:495:9: note: in expansion of macro 'htole32'
495 | u32 = htole32(0x00180018);
| ^~~~~~~
ntlmssp.cc:495:28: error: expected ')' before ';' token
495 | u32 = htole32(0x00180018);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:495:9: note: in expansion of macro 'htole32'
495 | u32 = htole32(0x00180018);
| ^~~~~~~
ntlmssp.cc:502:31: error: expected ')' before ';' token
502 | NTChallengeResponse_len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:501:9: note: in expansion of macro 'htole32'
501 | u32 = htole32((NTChallengeResponse_len<<16)|
| ^~~~~~~
ntlmssp.cc:502:31: error: expected ')' before ';' token
502 | NTChallengeResponse_len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:501:9: note: in expansion of macro 'htole32'
501 | u32 = htole32((NTChallengeResponse_len<<16)|
| ^~~~~~~
ntlmssp.cc:515:37: error: expected ')' before ';' token
515 | u32 = htole32((u32 << 16) | u32);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:515:11: note: in expansion of macro 'htole32'
515 | u32 = htole32((u32 << 16) | u32);
| ^~~~~~~
ntlmssp.cc:515:37: error: expected ')' before ';' token
515 | u32 = htole32((u32 << 16) | u32);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:515:11: note: in expansion of macro 'htole32'
515 | u32 = htole32((u32 << 16) | u32);
| ^~~~~~~
ntlmssp.cc:532:35: error: expected ')' before ';' token
532 | u32 = htole32((u32 << 16) | u32);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:532:9: note: in expansion of macro 'htole32'
532 | u32 = htole32((u32 << 16) | u32);
| ^~~~~~~
ntlmssp.cc:532:35: error: expected ')' before ';' token
532 | u32 = htole32((u32 << 16) | u32);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:532:9: note: in expansion of macro 'htole32'
532 | u32 = htole32((u32 << 16) | u32);
| ^~~~~~~
ntlmssp.cc:545:37: error: expected ')' before ';' token
545 | u32 = htole32((u32 << 16) | u32);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:545:11: note: in expansion of macro 'htole32'
545 | u32 = htole32((u32 << 16) | u32);
| ^~~~~~~
ntlmssp.cc:545:37: error: expected ')' before ';' token
545 | u32 = htole32((u32 << 16) | u32);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:545:11: note: in expansion of macro 'htole32'
545 | u32 = htole32((u32 << 16) | u32);
| ^~~~~~~
ntlmssp.cc:567:33: error: expected ')' before ';' token
567 | NTLMSSP_NEGOTIATE_UNICODE);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:561:9: note: in expansion of macro 'htole32'
561 | u32 = htole32(NTLMSSP_NEGOTIATE_56|NTLMSSP_NEGOTIATE_128|
| ^~~~~~~
ntlmssp.cc:567:33: error: expected ')' before ';' token
567 | NTLMSSP_NEGOTIATE_UNICODE);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:561:9: note: in expansion of macro 'htole32'
561 | u32 = htole32(NTLMSSP_NEGOTIATE_56|NTLMSSP_NEGOTIATE_128|
| ^~~~~~~
ntlmssp.cc:571:32: error: expected ')' before ';' token
571 | u32 = htole32(auth_data->len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:571:9: note: in expansion of macro 'htole32'
571 | u32 = htole32(auth_data->len);
| ^~~~~~~
ntlmssp.cc:571:32: error: expected ')' before ';' token
571 | u32 = htole32(auth_data->len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:571:9: note: in expansion of macro 'htole32'
571 | u32 = htole32(auth_data->len);
| ^~~~~~~
ntlmssp.cc:578:32: error: expected ')' before ';' token
578 | u32 = htole32(auth_data->len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:578:9: note: in expansion of macro 'htole32'
578 | u32 = htole32(auth_data->len);
| ^~~~~~~
ntlmssp.cc:578:32: error: expected ')' before ';' token
578 | u32 = htole32(auth_data->len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:578:9: note: in expansion of macro 'htole32'
578 | u32 = htole32(auth_data->len);
| ^~~~~~~
ntlmssp.cc:583:32: error: expected ')' before ';' token
583 | u32 = htole32(auth_data->len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:583:9: note: in expansion of macro 'htole32'
583 | u32 = htole32(auth_data->len);
| ^~~~~~~
ntlmssp.cc:583:32: error: expected ')' before ';' token
583 | u32 = htole32(auth_data->len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:583:9: note: in expansion of macro 'htole32'
583 | u32 = htole32(auth_data->len);
| ^~~~~~~
ntlmssp.cc:590:32: error: expected ')' before ';' token
590 | u32 = htole32(auth_data->len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:590:9: note: in expansion of macro 'htole32'
590 | u32 = htole32(auth_data->len);
| ^~~~~~~
ntlmssp.cc:590:32: error: expected ')' before ';' token
590 | u32 = htole32(auth_data->len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:590:9: note: in expansion of macro 'htole32'
590 | u32 = htole32(auth_data->len);
| ^~~~~~~
ntlmssp.cc:596:32: error: expected ')' before ';' token
596 | u32 = htole32(auth_data->len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:32: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:596:9: note: in expansion of macro 'htole32'
596 | u32 = htole32(auth_data->len);
| ^~~~~~~
ntlmssp.cc:596:32: error: expected ')' before ';' token
596 | u32 = htole32(auth_data->len);
| ^
In file included from ntlmssp.cc:164:
portable_endian.h:45:31: note: to match this '('
45 | # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
| ^
ntlmssp.cc:596:9: note: in expansion of macro 'htole32'
596 | u32 = htole32(auth_data->len);
| ^~~~~~~
make: *** [Makefile:61: ntlmssp.o] Error 1

@bxcrs
Copy link
Contributor Author

bxcrs commented Oct 10, 2019

build shell
docker image: docker run -ti --rm --user $(id -u) -v $(pwd):/workspace -w /workspace muslcc/x86_64:mips-linux-musl sh

sudo apk add make
export OPENSSL_DIR="/workspace/openssl-lib"
export LDFLAGS="-L/workspace/openssl-lib/lib -L/workspace/zlib-lib/lib"
export CPPFLAGS="-I/workspace/openssl-lib/include -I/workspace/zlib-lib/include"
export CLAGS="-I/workspace/openssl-lib/include -I/workspace/zlib-lib/include"
cd ncrack-0.7
./configure --host=mips --prefix=/workspace/ncrack-lib
make
make install

@bxcrs
Copy link
Contributor Author

bxcrs commented Oct 10, 2019

I fixed it, in ./portable_endian.h
// /* See http://linux.die.net/man/3/endian */
// # if !defined(GLIBC) || !defined(GLIBC_MINOR) || ((GLIBC < 2) || ((GLIBC == 2) && (GLIBC_MINOR < 9)) )
// # include <arpa/inet.h>
// # if defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN)
// # define htobe16(x) htons(x)
// # define htole16(x) (x)
// # define be16toh(x) ntohs(x)
// # define le16toh(x) (x)

// # define htobe32(x) htonl(x)
// # define htole32(x) (x)
// # define be32toh(x) ntohl(x)
// # define le32toh(x) (x)

// # define htobe64(x) (((uint64_t)htonl(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htonl(((uint32_t)(x)))) << 32))
// # define htole64(x) (x)
// # define be64toh(x) (((uint64_t)ntohl(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)ntohl(((uint32_t)(x)))) << 32))
// # define le64toh(x) (x)
// # elif defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)
// # define htobe16(x) (x)
// # define htole16(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))
// # define be16toh(x) (x)
// # define le16toh(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))

// # define htobe32(x) (x)
// # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
// # define be32toh(x) (x)
// # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))

// # define htobe64(x) (x)
// # define htole64(x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32))
// # define be64toh(x) (x)
// # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32))
// # else
// # error Byte Order not supported or not defined.
// # endif
// # endif

@ithilgore
Copy link
Collaborator

ithilgore commented Oct 10, 2019 via email

@bxcrs
Copy link
Contributor Author

bxcrs commented Oct 10, 2019

Can you embed your changes in an if statement inside the portable_endian.h that takes into account the MIPS architecture and make a pull request so that we integrate it in the main branch? Thanks,

On Thu, Oct 10, 2019 at 12:55 AM bxcrs @.**> wrote: I fixed it, in ./portable_endian.h // / See http://linux.die.net/man/3/endian */ // # if !defined(GLIBC) || !defined(GLIBC_MINOR) || ((GLIBC < 2) || ((GLIBC == 2) && (GLIBC_MINOR < 9)) ) // # include <arpa/inet.h> // # if defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN) // # define htobe16(x) htons(x) // # define htole16(x) (x) // # define be16toh(x) ntohs(x) // # define le16toh(x) (x) // # define htobe32(x) htonl(x) // # define htole32(x) (x) // # define be32toh(x) ntohl(x) // # define le32toh(x) (x) // # define htobe64(x) (((uint64_t)htonl(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htonl(((uint32_t)(x)))) << 32)) // # define htole64(x) (x) // # define be64toh(x) (((uint64_t)ntohl(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)ntohl(((uint32_t)(x)))) << 32)) // # define le64toh(x) (x) // # elif defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN) // # define htobe16(x) (x) // # define htole16(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8))) // # define be16toh(x) (x) // # define le16toh(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8))) // # define htobe32(x) (x) // # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16)) // # define be32toh(x) (x) // # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16)) // # define htobe64(x) (x) // # define htole64(x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32)) // # define be64toh(x) (x) // # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32)) // # else // # error Byte Order not supported or not defined. // # endif // # endif — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#63?email_source=notifications&email_token=ABGDEJDOII6QHVLMJZS5HH3QN27T3A5CNFSM4I7IBBRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA22MXA#issuecomment-540386908>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGDEJC7GETN7634L4BVP7TQN27T3ANCNFSM4I7IBBRA .
-- Fotios (Fotis) Chantzis https://sock-raw.org https://twitter.com/ithilgore

my pull request:
6726142

please close the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants