Commit Diff


commit - 7b19e0f11a9a06373281cb4ace30daa96aea6664
commit + 2b4402a2eb769abead4dd3371af94390722b5c3c
blob - d4a8f42fd8737024ad63b2772e30f8a5591022cc
blob + ab4b7f6352abbd153affdbc7e9599f715ae8e6bf
--- lib/error.c
+++ lib/error.c
@@ -16,7 +16,9 @@
 
 #include "got_error.h"
 
-#define nitems(a) (sizeof(a) / sizeof((a)[0]))
+#ifndef nitems
+#define nitems(_a) (sizeof(_a) / sizeof((_a)[0]))
+#endif
 
 const struct got_error *
 got_error(int code)