From 9af40a95c56ebe48571334670a900f01b554bc54 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Sun, 11 Dec 2011 16:11:31 +0100 Subject: [PATCH] quick hack to make hash tables from uthash compile on embedded systems --- config.h | 2 ++ uthash.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/config.h b/config.h index f4fbc677..e7c15507 100644 --- a/config.h +++ b/config.h @@ -7,6 +7,8 @@ #define WITH_CONTIKI 1 +#define uthash_fatal(msg) return + #define DEBUG 0 #define HAVE_STRNLEN 1 #define HAVE_SNPRINTF 1 diff --git a/uthash.h b/uthash.h index a4bdc18a..6f0e064d 100644 --- a/uthash.h +++ b/uthash.h @@ -64,7 +64,9 @@ typedef unsigned int uint32_t; #define UTHASH_VERSION 1.9.3 +#ifndef uthash_fatal #define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */ +#endif #define uthash_malloc(sz) malloc(sz) /* malloc fcn */ #define uthash_free(ptr,sz) free(ptr) /* free fcn */