Merge branch 'mingw-fixes' into 'master'

MinGW build fixes

See merge request sane-project/backends!483
merge-requests/244/head
Olaf Meeuwissen 2020-08-01 06:14:15 +00:00
commit 7056b4826b
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -142,6 +142,10 @@ posix_dlsym (void *handle, const char *func)
# define PATH_MAX 1024
#endif
#ifndef NAME_MAX
# define NAME_MAX FILENAME_MAX
#endif
#if defined(_WIN32) || defined(HAVE_OS2_H)
# define DIR_SEP ";"
#else

Wyświetl plik

@ -118,7 +118,7 @@ is_socket (int fd)
#if defined(S_ISSOCK)
return S_ISSOCK(sbuf.st_mode);
#elif defined (S_IFMT) && defined(S_IFMT)
#elif defined (S_IFMT) && defined(S_IFSOCK)
return (sbuf.st_mode & S_IFMT) == S_IFSOCK;
#else
return 0;
@ -133,6 +133,7 @@ sanei_debug_msg
if (max_level >= level)
{
#if defined(LOG_DEBUG)
if (is_socket(fileno(stderr)))
{
msg = (char *)malloc (sizeof(char) * (strlen(be) + strlen(fmt) + 4));
@ -149,6 +150,7 @@ sanei_debug_msg
}
}
else
#endif
{
struct timeval tv;
struct tm *t;