Skip to content

Commit

Permalink
Merge pull request #248 from DigitalDJ/master
Browse files Browse the repository at this point in the history
Fix build with Win32 VC14
  • Loading branch information
damienstuart committed Jan 27, 2024
2 parents 19c65a9 + 66bc839 commit e4b2c8c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions lib/fko_encryption.c
Expand Up @@ -37,6 +37,20 @@
#include "gpgme_funcs.h"
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
/* Taken from cURL for win32 build
*/
#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
#if !defined(S_IFLNK)
#define S_IFLNK 0xA000
#endif
#if !defined(S_ISLNK) && defined(S_IFMT)
#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
#endif
#endif
#endif

Expand Down
5 changes: 4 additions & 1 deletion win32/config.h
Expand Up @@ -47,6 +47,9 @@
/* Define if you have libgpgme */
#undef HAVE_LIBGPGME

/* Path to gpg executable */
#define GPG_EXE "gpg.exe"

/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
Expand Down Expand Up @@ -123,7 +126,7 @@
#undef HAVE_SYS_SOCKET_H

/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
Expand Down

0 comments on commit e4b2c8c

Please sign in to comment.