Skip to content

Commit

Permalink
fix(md5): Add some header file and macro for MD5.
Browse files Browse the repository at this point in the history
For some old gcc, this is required.

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Apr 24, 2024
1 parent 25103a1 commit 30cfe01
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions eco.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,29 @@

#include "helper.h"

#if defined(__linux__) || defined(__CYGWIN__)
#include <byteswap.h>
#include <endian.h>

#elif defined(__APPLE__)
#include <machine/endian.h>
#include <machine/byte_order.h>
#elif defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <machine/endian.h>
#endif

#ifndef __BYTE_ORDER
#define __BYTE_ORDER BYTE_ORDER
#endif
#ifndef __BIG_ENDIAN
#define __BIG_ENDIAN BIG_ENDIAN
#endif
#ifndef __LITTLE_ENDIAN
#define __LITTLE_ENDIAN LITTLE_ENDIAN
#endif

struct eco_context {
struct ev_loop *loop;
lua_State *L;
Expand Down

0 comments on commit 30cfe01

Please sign in to comment.