aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2015-11-25 21:22:55 -0800
committerAndrew Waterman <waterman@cs.berkeley.edu>2015-11-25 21:22:55 -0800
commitd37b50edf5faee2fe41a2586479ddab7c8a2ec9b (patch)
tree2837146e7143161a9c5d38eb5a857c259f934ad4
parente66623316c01ea4cd693120faecffe61a14df824 (diff)
downloadpk-d37b50edf5faee2fe41a2586479ddab7c8a2ec9b.zip
pk-d37b50edf5faee2fe41a2586479ddab7c8a2ec9b.tar.gz
pk-d37b50edf5faee2fe41a2586479ddab7c8a2ec9b.tar.bz2
Don't rely on arpa/inet.h; newlib doesn't provide it
-rw-r--r--pk/devicetree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pk/devicetree.c b/pk/devicetree.c
index 9a7f772..3ea33d0 100644
--- a/pk/devicetree.c
+++ b/pk/devicetree.c
@@ -2,9 +2,10 @@
#include "encoding.h"
#include "pk.h"
#include "mtrap.h"
-#include <arpa/inet.h>
#include <stdbool.h>
+#define ntohl(x) __builtin_bswap32(x)
+
static uintptr_t max_hart_id;
static uint64_t fdt_read_uint64(uint32_t* addr) {