Drop libcompat to simplify build deps and really fix #11
The original idea with libcompat was to keep as few objects as possible for linking with libsyslog. That in turn to prevent a user of libsyslog from suddenly also getting strong binding to symbols like strlcpy() from libsyslog, rather than their C library of choice. However, this caused strlcpy.c to be built as both .o and .lo files, which in turn caused really bizarre build problems due to bad DAG dependency. This patch drops libcompat and instead marks all replacement APIs as weak symbols, which a C library can override. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@ -15,7 +15,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <config.h>
|
||||
#ifndef HAVE_UTIMENSAT
|
||||
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_FCNTL_H
|
||||
@ -23,7 +24,8 @@
|
||||
#endif
|
||||
#include <sys/time.h> /* lutimes(), utimes(), utimensat() */
|
||||
|
||||
int utimensat(int dirfd, const char *pathname, const struct timespec ts[2], int flags)
|
||||
int
|
||||
__utimensat(int dirfd, const char *pathname, const struct timespec ts[2], int flags)
|
||||
{
|
||||
int ret = -1;
|
||||
struct timeval tv[2];
|
||||
@ -45,3 +47,7 @@ int utimensat(int dirfd, const char *pathname, const struct timespec ts[2], int
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
weak_alias(__utimensat, utimensat);
|
||||
|
||||
#endif /* HAVE_UTIMENSAT */
|
||||
|
Reference in New Issue
Block a user