[lxc-devel] [lxc/master] utils: declare sethostname() static inline

brauner on Github lxc-bot at linuxcontainers.org
Fri Dec 1 22:19:11 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20171201/d5510ae2/attachment.bin>
-------------- next part --------------
From 2650fb4d5ea9a0789f957f01bfd32c551e3ecf3e Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Fri, 1 Dec 2017 23:18:09 +0100
Subject: [PATCH] utils: declare sethostname() static inline

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/utils.h b/src/lxc/utils.h
index 5273203cf..7aa25ca35 100644
--- a/src/lxc/utils.h
+++ b/src/lxc/utils.h
@@ -122,7 +122,7 @@ static inline int setns(int fd, int nstype)
 
 /* Define sethostname() if missing from the C library */
 #ifndef HAVE_SETHOSTNAME
-static int sethostname(const char * name, size_t len)
+static inline int sethostname(const char * name, size_t len)
 {
 #ifdef __NR_sethostname
 return syscall(__NR_sethostname, name, len);


More information about the lxc-devel mailing list