void-packages/srcpkgs/minicom/patches/Add-ARRAY_SIZE-macro.patch

20 lines
575 B
Diff

# HG changeset patch
# User Adam Lackorzynski <adam@os.inf.tu-dresden.de>
# Date 1440364600 -7200
# Node ID 4eff7b4cde33a56d9caf64e44722186c89e26922
# Parent 3cb4335d5819099c85a30dae714f0a213fa4a44c
Add ARRAY_SIZE macro
diff -r 3cb4335d5819 -r 4eff7b4cde33 src/minicom.h
--- src/minicom.h Mon Jun 29 21:16:14 2015 +0200
+++ src/minicom.h Sun Aug 23 23:16:40 2015 +0200
@@ -302,6 +302,7 @@
int lockfile_create(int no_msgs);
void lockfile_remove(void);
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
/* We want the ANSI offsetof macro to do some dirty stuff. */