Skip to content

Commit

Permalink
Fix building on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jun 16, 2021
1 parent 19000cd commit 5aafb35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/futils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@
#if defined(_MSC_VER)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#elif defined(__APPLE__)
#include <Targetconditionals.h>
#ifndef TARGET_OS_IPHONE
#include <libproc.h>
#endif
#endif

#if defined(__FreeBSD__)
#include <sys/mount.h>
Expand Down Expand Up @@ -455,11 +458,13 @@ namespace Exiv2 {
CloseHandle(processHandle);
}
#elif defined(__APPLE__)
#ifndef TARGET_OS_IPHONE
const int pid = getpid();
char pathbuf[PROC_PIDPATHINFO_MAXSIZE];
if (proc_pidpath (pid, pathbuf, sizeof(pathbuf)) > 0) {
ret = pathbuf;
}
#endif
#elif defined(__FreeBSD__)
unsigned int n;
char buffer[PATH_MAX] = {};
Expand Down

0 comments on commit 5aafb35

Please sign in to comment.