diff --git a/emulator/amp.c b/emulator/amp.c
index 714854b..ab7f9de 100644
--- a/emulator/amp.c
+++ b/emulator/amp.c
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
+#include "src/shared/util.h"
#include "monitor/mainloop.h"
#include "monitor/bt.h"
#include "amp.h"
-#define le16_to_cpu(val) (val)
-#define le32_to_cpu(val) (val)
-#define cpu_to_le16(val) (val)
-#define cpu_to_le32(val) (val)
-
#define PHY_MODE_IDLE 0x00
#define PHY_MODE_INITIATOR 0x01
#define PHY_MODE_ACCEPTOR 0x02
diff --git a/emulator/btdev.c b/emulator/btdev.c
index 90df0f3..0d0b362 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
#include <string.h>
#include <alloca.h>
+#include "src/shared/util.h"
#include "monitor/bt.h"
#include "btdev.h"
-#define le16_to_cpu(val) (val)
-#define le32_to_cpu(val) (val)
-#define cpu_to_le16(val) (val)
-#define cpu_to_le32(val) (val)
-
#define has_bredr(btdev) (!((btdev)->features[4] & 0x20))
#define has_le(btdev) (!!((btdev)->features[4] & 0x40))
diff --git a/emulator/bthost.c b/emulator/bthost.c
index ba59431..96d375f 100644
--- a/emulator/bthost.c
+++ b/emulator/bthost.c
#include "bluetooth/bluetooth.h"
+#include "src/shared/util.h"
#include "monitor/bt.h"
#include "bthost.h"
#define acl_handle(h) (h & 0x0fff)
#define acl_flags(h) (h >> 12)
-#define le16_to_cpu(val) (val)
-#define le32_to_cpu(val) (val)
-#define cpu_to_le16(val) (val)
-#define cpu_to_le32(val) (val)
-
struct cmd {
struct cmd *next;
struct cmd *prev;
diff --git a/emulator/le.c b/emulator/le.c
index b3a4bc4..62b231d 100644
--- a/emulator/le.c
+++ b/emulator/le.c
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
+#include "src/shared/util.h"
#include "monitor/mainloop.h"
#include "monitor/bt.h"
#include "le.h"
-#define le16_to_cpu(val) (val)
-#define le32_to_cpu(val) (val)
-#define cpu_to_le16(val) (val)
-#define cpu_to_le32(val) (val)
-
#define WHITE_LIST_SIZE 16
struct bt_le {