$NetBSD$

--- PPMd.cpp.orig	Sat Apr  2 09:39:52 2005
+++ PPMd.cpp
@@ -107,7 +107,13 @@ struct ENV_FILE_FINDER {
 #include <utime.h>
 #include <dirent.h>
 #include <unistd.h>
+#ifdef __APPLE__
+#undef _POSIX_SOURCE
+#endif
 #include <fnmatch.h>
+#ifdef __APPLE__
+#define _POSIX_SOURCE
+#endif
 #if defined(__DJGPP__)
 #include <crt0.h>
 char **__crt0_glob_function (char *arg) { return 0; }
@@ -215,7 +221,7 @@ void _STDCALL PrintInfo(_PPMD_FILE* Deco
     UINT n1=(8U*NEnc)/NDec;
     UINT n2=(100U*(8U*NEnc-NDec*n1)+NDec/2U)/NDec;
     if (n2 == 100) { n1++;                  n2=0; }
-    int RunTime=((clock()-StartClock) << 10)/int(CLK_TCK);
+    int RunTime=((clock()-StartClock) << 10)/int(CLOCKS_PER_SEC);
     UINT Speed=NDec/(RunTime+(RunTime == 0));
     UINT UsedMemory=GetUsedMemory() >> 10;
     UINT m1=UsedMemory >> 10;
