1inch / profanity2

Vanity address generator for Ethereum
337 stars 91 forks source link

Add htonll define #3

Closed xxMattewxx closed 1 year ago

xxMattewxx commented 1 year ago

Code wouldn't compile for me otherwise. I have tried both WSL2 Ubuntu and NVIDIA's OpenCL docker images, the two failed compile with "error: ‘htonll’ was not declared in this scope; did you mean ‘htonl’?".

yoyyyyo commented 1 year ago

might be a good idea to wrap the macro in an ifndef so as to not redefine it if it already exists elsewhere, like so:

#ifndef htonll
#define htonll(x) ((((uint64_t)htonl(x)) << 32) + htonl((x) >> 32))
#endif