diff --git a/plugins/in_calyptia_fleet/in_calyptia_fleet.c b/plugins/in_calyptia_fleet/in_calyptia_fleet.c index 310c697ae18..ee2e5cfa0b7 100644 --- a/plugins/in_calyptia_fleet/in_calyptia_fleet.c +++ b/plugins/in_calyptia_fleet/in_calyptia_fleet.c @@ -127,29 +127,6 @@ static int is_link(const char *path) { static int is_link(const char *path) { return FLB_FALSE; } - -/* we include readlink just in case... and also so it can link. */ -ssize_t readlink(const char *path, char *realpath, size_t srealpath) { - HANDLE hFile; - DWORD ret; - - hFile = CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - - if (hFile == INVALID_HANDLE_VALUE) { - return -1; - } - - ret = GetFinalPathNameByHandleA(hFile, realpath, srealpath, VOLUME_NAME_NT); - - if (ret < srealpath) { - CloseHandle(hFile); - return -1; - } - - CloseHandle(hFile); - return ret; -} #endif @@ -989,34 +966,6 @@ static int get_calyptia_fleet_id_by_name(struct flb_in_calyptia_fleet_config *ct return 0; } -#ifdef FLB_SYSTEM_WINDOWS -#define link(a, b) CreateHardLinkA(b, a, 0) -#define symlink(a, b) CreateSymLinkA(b, a, 0) - -ssize_t readlink(const char *path, char *realpath, size_t srealpath) { - HANDLE hFile; - DWORD ret; - - hFile = CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - - if (hFile == INVALID_HANDLE_VALUE) { - return -1; - } - - ret = GetFinalPathNameByHandleA(hFile, realpath, srealpath, VOLUME_NAME_NT); - - if (ret < srealpath) { - CloseHandle(hFile); - return -1; - } - - CloseHandle(hFile); - return ret; -} - -#endif - #ifdef FLB_SYSTEM_WINDOWS #define _mkdir(a, b) mkdir(a) #else