summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-06-07 15:57:09 +0200
committerSimon Rettberg2024-06-07 15:57:09 +0200
commit0344ea0a83c7e46a3192397dca510087741c0f55 (patch)
tree73ffa48ae5239f46db8dcd24a7129a3d9983e175
parent[FUSE] curl: Handle read callbacks with < 4k buffer size (diff)
downloaddnbd3-0344ea0a83c7e46a3192397dca510087741c0f55.tar.gz
dnbd3-0344ea0a83c7e46a3192397dca510087741c0f55.tar.xz
dnbd3-0344ea0a83c7e46a3192397dca510087741c0f55.zip
[server] Avoid redefining container_of
-rw-r--r--src/server/reference.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/reference.h b/src/server/reference.h
index 75a681f..8304c6b 100644
--- a/src/server/reference.h
+++ b/src/server/reference.h
@@ -5,8 +5,10 @@
#include <stddef.h>
#include <stdint.h>
+#ifndef container_of
#define container_of(ptr, type, member) \
((type *)((char *)(ptr) - (char *)&(((type *)NULL)->member)))
+#endif
void ref_init( ref *reference, void ( *freefun )( ref * ), long count );