dbench icon indicating copy to clipboard operation
dbench copied to clipboard

Compiling Issue On Ubuntu 18.04

Open turtle0x1 opened this issue 7 years ago • 0 comments

Apologies if this is not the correct place but when i tried to compile dbench i got the error message;

libnfs.c:28:39: error: ‘intptr_t’ undeclared (first use in this function); did you mean ‘__intptr_t’? #define discard_const(ptr) ((void *)((intptr_t)(ptr))) ^ libnfs.c:63:7: note: in expansion of macro ‘discard_const’ free(discard_const(t->key.dptr)); ^~~~~~~~~~~~~ libnfs.c:28:39: note: each undeclared identifier is reported only once for each function it appears in #define discard_const(ptr) ((void *)((intptr_t)(ptr))) ^ libnfs.c:63:7: note: in expansion of macro ‘discard_const’ free(discard_const(t->key.dptr)); ^~~~~~~~~~~~~ libnfs.c: In function ‘recursive_lookup_fhandle’: libnfs.c:126:2: warning: ‘return’ with no value, in function returning non-void return ; ^~~~~~ libnfs.c:87:16: note: declared here static data_t *recursive_lookup_fhandle(struct nfsio *nfsio, const char *name) ^~~~~~~~~~~~~~~~~~~~~~~~ libnfs.c: In function ‘insert_fhandle’: libnfs.c:28:39: error: ‘intptr_t’ undeclared (first use in this function); did you mean ‘__intptr_t’? #define discard_const(ptr) ((void *)((intptr_t)(ptr)))

Im no C developer but adding #include <stdint.h> to libnfs.c seems to have fixed the issue!

turtle0x1 avatar Sep 14 '18 11:09 turtle0x1