]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
macro: s/LXC_NUMSTRLEN64/INTTYPE_TO_STRLEN()/
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 25 Aug 2018 10:15:15 +0000 (12:15 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 28 Aug 2018 18:14:52 +0000 (20:14 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/macro.h

index 79bbdb751d70ade178df3d2244d32062bba33c81..68bdfdcc90c7fa185099c481e63a4c1e0f66ce09 100644 (file)
@@ -32,6 +32,7 @@
 #include <sys/mount.h>
 #include <sys/socket.h>
 #include <sys/un.h>
+#include <unistd.h>
 
 /* Define __S_ISTYPE if missing from the C library. */
 #ifndef __S_ISTYPE
  *                +
  * \0           =    1
  */
-#define LXC_PROC_PID_FD_LEN (6 + LXC_NUMSTRLEN64 + 4 + LXC_NUMSTRLEN64 + 1)
+#define LXC_PROC_PID_FD_LEN (6 + INTTYPE_TO_STRLEN(pid_t) + 4 + INTTYPE_TO_STRLEN(int) + 1)
 /* /proc/pid-to-str/status\0 = (5 + 21 + 7 + 1) */
-#define LXC_PROC_STATUS_LEN (5 + (LXC_NUMSTRLEN64) + 7 + 1)
+#define LXC_PROC_STATUS_LEN (5 + (INTTYPE_TO_STRLEN(pid_t)) + 7 + 1)
 #define LXC_CMD_DATA_MAX (MAXPATHLEN * 2)
 #define LXC_LSMATTRLEN (5 + (INTTYPE_TO_STRLEN(pid_t)) + 7 + 1)