Merge "allow rpm to custom systemd installation" into tizen
[platform/upstream/rpm.git] / system.h
index 1101ed9..f3b1bab 100644 (file)
--- a/system.h
+++ b/system.h
@@ -9,11 +9,6 @@
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-
-#include <sys/stat.h>
-#include <stdio.h>
-
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
@@ -32,10 +27,6 @@ extern char ** environ;
 #endif
 #endif
 
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
-
 #if !defined(HAVE_STPCPY)
 char * stpcpy(char * dest, const char * src);
 #endif
@@ -44,12 +35,9 @@ char * stpcpy(char * dest, const char * src);
 char * stpncpy(char * dest, const char * src, size_t n);
 #endif
 
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
-#if HAVE___SECURE_GETENV
+#if HAVE_SECURE_GETENV
+#define        getenv(_s)      secure_getenv(_s)
+#elif HAVE___SECURE_GETENV
 #define        getenv(_s)      __secure_getenv(_s)
 #endif
 
@@ -76,8 +64,6 @@ extern int errno;
 # endif /* HAVE_NDIR_H */
 #endif /* HAVE_DIRENT_H */
 
-#include <ctype.h>
-
 #if HAVE_LIMITS_H
 #include <limits.h>
 #endif
@@ -94,6 +80,8 @@ extern int errno;
 
 #if WITH_SELINUX
 #include <selinux/selinux.h>
+#include <selinux/label.h>
+#include <selinux/avc.h>
 #else
 typedef        char * security_context_t;
 
@@ -108,6 +96,10 @@ typedef     char * security_context_t;
 #define matchpathcon_fini()                    (0)
 #define matchpathcon(_fn, _fm, _c)             (-1)
 
+#define selabel_lookup_raw(_hnd, _scon, _key,_type)    (-1)
+
+#define selinux_file_context_path() (0)
+
 #define rpm_execcon(_v, _fn, _av, _envp)       (0)
 #endif
 
@@ -147,17 +139,8 @@ extern const char *__progname;
 
 /* ============== from misc/miscfn.h */
 
-#if !defined(USE_GNU_GLOB) 
-#if HAVE_FNMATCH_H
-#include <fnmatch.h>
-#endif
-
-#if HAVE_GLOB_H 
-#include <glob.h>
-#endif
-#else
-#include "misc/glob.h"
 #include "misc/fnmatch.h"
-#endif
+
+#include <dlfcn.h>
 
 #endif /* H_SYSTEM */