From 0c4f7d821c1cd4ce559476595e2108f75b3dde7c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 22 Oct 2007 21:33:47 -0700 Subject: Fix broken or missing includes Signed-off-by: Dan McGee --- lib/libalpm/server.c | 5 +++-- lib/libalpm/util.h | 12 ++++++------ src/pacman/sync.c | 1 + src/pacman/util.c | 1 + 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c index f0bdcbcf..11a92033 100644 --- a/lib/libalpm/server.c +++ b/lib/libalpm/server.c @@ -22,13 +22,14 @@ #include "config.h" #include +#include +#include #include +#include #include #include #include #include -#include -#include #include /* libalpm */ diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h index 5b6fac99..3154f470 100644 --- a/lib/libalpm/util.h +++ b/lib/libalpm/util.h @@ -27,20 +27,20 @@ #include #include -#include /* here so it doesn't need to be included elsewhere */ #include -#define FREE(p) do { if (p) { free(p); p = NULL; } } while(0) - -#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0) - -/* define _() as shortcut for gettext() */ #ifdef ENABLE_NLS +#include /* here so it doesn't need to be included elsewhere */ +/* define _() as shortcut for gettext() */ #define _(str) dgettext ("libalpm", str) #else #define _(s) s #endif +#define FREE(p) do { if (p) { free(p); p = NULL; } } while(0) + +#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0) + int _alpm_makepath(const char *path); int _alpm_copyfile(const char *src, const char *dest); char *_alpm_strtrim(char *str); diff --git a/src/pacman/sync.c b/src/pacman/sync.c index bf6eed1b..30834a10 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/src/pacman/util.c b/src/pacman/util.c index 78a359be..e182f38f 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3-24-g4f1b