From 8db134e7f457bcb069ec72bc4ee722e2af557c69 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 29 Oct 2015 10:48:23 +1100 Subject: Prevent name collisions with system glob (bz#2463) Move glob.h from includes.h to the only caller (sftp) and override the names for the symbols. This prevents name collisions with the system glob in the case where something other than ssh uses it (eg kerberos). With jjelen at redhat.com, ok djm@ --- openbsd-compat/glob.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'openbsd-compat/glob.h') diff --git a/openbsd-compat/glob.h b/openbsd-compat/glob.h index f8a7fa5ff..f069a05dc 100644 --- a/openbsd-compat/glob.h +++ b/openbsd-compat/glob.h @@ -42,11 +42,15 @@ !defined(HAVE_DECL_GLOB_NOMATCH) || HAVE_DECL_GLOB_NOMATCH == 0 || \ defined(BROKEN_GLOB) -#ifndef _GLOB_H_ -#define _GLOB_H_ +#ifndef _COMPAT_GLOB_H_ +#define _COMPAT_GLOB_H_ #include +# define glob_t _ssh_compat_glob_t +# define glob(a, b, c, d) _ssh__compat_glob(a, b, c, d) +# define globfree(a) _ssh__compat_globfree(a) + struct stat; typedef struct { int gl_pathc; /* Count of total paths so far. */ -- cgit v1.2.3