diff options
Diffstat (limited to 'lib/Target/CppBackend')
-rw-r--r-- | lib/Target/CppBackend/CallHandlers.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/CppBackend/CallHandlers.h b/lib/Target/CppBackend/CallHandlers.h index 3e85c04fed..3a45691432 100644 --- a/lib/Target/CppBackend/CallHandlers.h +++ b/lib/Target/CppBackend/CallHandlers.h @@ -92,6 +92,8 @@ DEF_CALL_HANDLER(name, { \ // Various simple redirects for our js libc, see library.js DEF_REDIRECT_HANDLER_i(putc, fputc); DEF_REDIRECT_HANDLER_i(__cxa_atexit, atexit); +DEF_REDIRECT_HANDLER_i(ntohl, htonl); +DEF_REDIRECT_HANDLER_i(ntohs, htons); // Setups @@ -114,6 +116,8 @@ void setupCallHandlers() { SETUP_CALL_HANDLER(bitshift64Shl); SETUP_CALL_HANDLER(putc); SETUP_CALL_HANDLER(__cxa_atexit); + SETUP_CALL_HANDLER(ntohl); + SETUP_CALL_HANDLER(ntohs); } std::string handleCall(const CallInst *CI) { |