From 3a4186ae40d0c3b7be46a4c973166f6048fcfe38 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Sat, 16 Mar 2013 15:11:10 +0100 Subject: Fix sss_client breakage. Adding missing dependencies for linker. Missing dependency was introduced by commit 22d381367c27910fe82f476a76b9f4ede555e35a in changed file src/sss_client/nss_mc_common.c All function declaration for io.c was moved from util.h to separate file io.h, https://fedorahosted.org/sssd/ticket/1838 --- src/util/io.c | 8 +++++++- src/util/io.h | 33 +++++++++++++++++++++++++++++++++ src/util/murmurhash3.h | 8 ++++++++ src/util/util.h | 4 +--- 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 src/util/io.h (limited to 'src/util') diff --git a/src/util/io.c b/src/util/io.c index e07a18c56..4d1f2e74a 100644 --- a/src/util/io.c +++ b/src/util/io.c @@ -24,8 +24,14 @@ #include #include +#include -#include "util/util.h" +#include "util/io.h" + +/* CAUTION: + * This file have to be minimalist and cannot include DEBUG macros + * or header file util.h. + */ int sss_open_cloexec(const char *pathname, int flags, int *ret) { diff --git a/src/util/io.h b/src/util/io.h new file mode 100644 index 000000000..8d10ed9c2 --- /dev/null +++ b/src/util/io.h @@ -0,0 +1,33 @@ +/* + SSSD + + SSSD Utility functions + + Copyright (C) Lukas Slebodnik 2013 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef _UTIL_IO_H_ +#define _UTIL_IO_H_ + +/* CAUTION: + * This file is also used in sss_client (pam, nss). Therefore it have to be + * minimalist and cannot include DEBUG macros or header file util.h. + */ + +int sss_open_cloexec(const char *pathname, int flags, int *ret); +int sss_openat_cloexec(int dir_fd, const char *pathname, int flags, int *ret); + +#endif /* _UTIL_IO_H_ */ diff --git a/src/util/murmurhash3.h b/src/util/murmurhash3.h index db7d8a48c..6910e596b 100644 --- a/src/util/murmurhash3.h +++ b/src/util/murmurhash3.h @@ -6,7 +6,15 @@ * clients can be both 64 or 32 bit at the same time. */ +#ifndef _UTIL_MURMURHASH3_H_ +#define _UTIL_MURMURHASH3_H_ + #include +/* CAUTION: + * This file is also used in sss_client (pam, nss). Therefore it have to be + * minimalist and cannot include DEBUG macros or header file util.h. + */ uint32_t murmurhash3(const char *key, int len, uint32_t seed); +#endif /* _UTIL_MURMURHASH3_H_ */ diff --git a/src/util/util.h b/src/util/util.h index e61a94f7f..33725f635 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -584,9 +584,7 @@ errno_t sssd_domain_init(TALLOC_CTX *mem_ctx, /* from util_lock.c */ errno_t sss_br_lock_file(int fd, size_t start, size_t len, int num_tries, useconds_t wait); -/* from io.c */ -int sss_open_cloexec(const char *pathname, int flags, int *ret); -int sss_openat_cloexec(int dir_fd, const char *pathname, int flags, int *ret); +#include "io.h" /* Endianness-compatibility for systems running older versions of glibc */ -- cgit