]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
include: make all functions __hidden
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 2 Sep 2021 13:57:05 +0000 (15:57 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 2 Sep 2021 13:57:05 +0000 (15:57 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/include/fexecve.h
src/include/getgrgid_r.h
src/include/getline.h
src/include/lxcmntent.h
src/include/netns_ifaddrs.h
src/include/openpty.h
src/include/prlimit.h
src/include/strchrnul.h
src/include/strlcat.h
src/include/strlcpy.h

index f822c18f6590c8fd4b967f4c4062af45a68c79d4..4c0a8b0f5dc924e7ab30583863ebfaf8b0cb9e78 100644 (file)
@@ -21,7 +21,9 @@
 #ifndef _LXC_FEXECVE_H
 #define _LXC_FEXECVE_H
 
+#include "../lxc/compiler.h"
 #include <stdio.h>
-extern int fexecve(int fd, char *const argv[], char *const envp[]);
+
+__hidden extern int fexecve(int fd, char *const argv[], char *const envp[]);
 
 #endif /* _LXC_FEXECVE_H */
index d01395b612d05e9ef579bf95ac999b0da467abd0..6a8c418c9506127278cc26691a26dcafbcc71c1a 100644 (file)
@@ -26,7 +26,9 @@
 #include <sys/types.h>
 #include <grp.h>
 
-extern int getgrgid_r(gid_t gid, struct group *gr, char *buf, size_t size,
+#include "../lxc/compiler.h"
+
+__hidden extern int getgrgid_r(gid_t gid, struct group *gr, char *buf, size_t size,
                      struct group **res);
 
 #endif /* _GETGRGID_R_H */
index 68452daf18dbee4f8141086d3a56d1252e14ba75..cbf9db925f03918238671e4ec7e248620b298352 100644 (file)
@@ -32,6 +32,8 @@
 
 #include <stdio.h>
 
-extern ssize_t getline(char **outbuf, size_t *outsize, FILE *fp);
+#include "../lxc/compiler.h"
+
+__hidden extern ssize_t getline(char **outbuf, size_t *outsize, FILE *fp);
 
 #endif
index 1d45d4826b3f68e4f9e8feb5a9598c50ffb489c5..f8954b4510b958474b9a46945ebff6fe2dcdcdf0 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _LXCMNTENT_H
 #define _LXCMNTENT_H
 
+#include "../lxc/compiler.h"
+
 #if IS_BIONIC
 struct mntent
 {
@@ -32,20 +34,21 @@ struct mntent
     int mnt_passno;
 };
 
-extern struct mntent *getmntent (FILE *stream);
-extern struct mntent *getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz);
+__hidden extern struct mntent *getmntent(FILE *stream);
+__hidden extern struct mntent *getmntent_r(FILE *stream, struct mntent *mp,
+                                          char *buffer, int bufsiz);
 #endif
 
 #if !defined(HAVE_SETMNTENT) || IS_BIONIC
-FILE *setmntent (const char *file, const char *mode);
+__hidden FILE *setmntent(const char *file, const char *mode);
 #endif
 
 #if !defined(HAVE_ENDMNTENT) || IS_BIONIC
-int endmntent (FILE *stream);
+__hidden int endmntent(FILE *stream);
 #endif
 
 #if !defined(HAVE_HASMNTOPT) || IS_BIONIC
-extern char *hasmntopt (const struct mntent *mnt, const char *opt);
+__hidden extern char *hasmntopt(const struct mntent *mnt, const char *opt);
 #endif
 
 #endif
index d3f1d6eef8c47c913f47d3db3a5a73ac30ccda80..1dc3448acb5ad6a60b03177181e835319ee149ed 100644 (file)
@@ -12,8 +12,8 @@ extern "C" {
 #include <stdbool.h>
 #include <sys/socket.h>
 
-#include "compiler.h"
-#include "memory_utils.h"
+#include "../lxc/compiler.h"
+#include "../lxc/memory_utils.h"
 
 struct netns_ifaddrs {
        struct netns_ifaddrs *ifa_next;
index 8d4699f9a0a3851885c175a4bcb662c519290137..6302caea3e9b3c4de380115591b341cca9d0a491 100644 (file)
@@ -6,12 +6,15 @@
 #include <termios.h>
 #include <sys/ioctl.h>
 
+#include "../lxc/memory_utils.h"
+
 /*
  * Create pseudo tty ptx pty pair with @__name and set terminal
  * attributes according to @__termp and @__winp and return handles for both
  * ends in @__aptx and @__apts.
  */
-extern int openpty(int *ptx, int *pty, char *name, const struct termios *termp,
-                  const struct winsize *winp);
+__hidden extern int openpty(int *ptx, int *pty, char *name,
+                           const struct termios *termp,
+                           const struct winsize *winp);
 
 #endif
index 9b91e8b6ccbff3af5063d38445bf91a090b43aca..a36b7952893948bbfd29e26c9c9aa05950eb830a 100644 (file)
 #include <linux/resource.h>
 #include <sys/types.h>
 
+#include "../lxc/memory_utils.h"
+
 #define RLIM_SAVED_CUR RLIM_INFINITY
 #define RLIM_SAVED_MAX RLIM_INFINITY
 
-int prlimit(pid_t, int, const struct rlimit*, struct rlimit*);
-int prlimit64(pid_t, int, const struct rlimit64*, struct rlimit64*);
+__hidden int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
+__hidden int prlimit64(pid_t, int, const struct rlimit64 *, struct rlimit64 *);
 
 #endif
index 70a0d9442172595c3e5c24cc975ac5d830ca1dda..94e291700e392818e8ea91bdc910b9fa94da338b 100644 (file)
@@ -20,6 +20,6 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include "compiler.h"
+#include "../lxc/compiler.h"
 
 __hidden extern char *strchrnul(const char *s, int c_in);
index 60f7d8e05367eca1c7ec6b7835776839311f3f2d..748c3a6c2058f00472e3dbec46fa08b562dde29a 100644 (file)
@@ -22,8 +22,9 @@
 #ifndef _STRLCAT_H
 #define _STRLCAT_H
 
+#include "../lxc/compiler.h"
 #include <stdio.h>
 
-extern size_t strlcat(char *src, const char *append, size_t len);
+__hidden extern size_t strlcat(char *src, const char *append, size_t len);
 
 #endif
index 419cecf38104bacf8ac6dc56d74b25a821355772..996e542cfe30a7b821a9a1171a06f8d7e78f3152 100644 (file)
@@ -22,8 +22,9 @@
 #ifndef _STRLCPY_H
 #define _STRLCPY_H
 
+#include "../lxc/compiler.h"
 #include <stdio.h>
 
-extern size_t strlcpy(char *, const char *, size_t);
+__hidden extern size_t strlcpy(char *, const char *, size_t);
 
 #endif