diff --git gschem/src/gschem_change_notification.c gschem/src/gschem_change_notification.c
index 2a2cf40..186074f 100644
--- gschem/src/gschem_change_notification.c
+++ gschem/src/gschem_change_notification.c
@@ -72,6 +72,11 @@
 #include "gschem.h"
 #include "../include/gschem_change_notification.h"
 
+#if defined(__APPLE__) || defined(__NetBSD__) 
+#define st_atim st_atimespec
+#define st_ctim st_ctimespec
+#define st_mtim st_mtimespec
+#endif
 
 enum {
   PROP_GSCHEM_TOPLEVEL = 1,     /* GschemToplevel * */
diff --git gschem/src/gschem_patch_dockable.c gschem/src/gschem_patch_dockable.c
index 1780dc1..31d35f4 100644
--- gschem/src/gschem_patch_dockable.c
+++ gschem/src/gschem_patch_dockable.c
@@ -47,6 +47,12 @@ enum {
   COLUMN_COUNT
 };
 
+#if defined(__APPLE__) || defined(__NetBSD__) 
+#define st_atim st_atimespec
+#define st_ctim st_ctimespec
+#define st_mtim st_mtimespec
+#endif
+
 typedef void (*NotifyFunc) (void *, void *);
 
 
diff --git gschem/src/x_highlevel.c gschem/src/x_highlevel.c
index 8659cb8..5d11c4b 100644
--- gschem/src/x_highlevel.c
+++ gschem/src/x_highlevel.c
@@ -34,6 +34,11 @@
 
 #include "gschem.h"
 
+#if defined(__APPLE__) || defined(__NetBSD__) 
+#define st_atim st_atimespec
+#define st_ctim st_ctimespec
+#define st_mtim st_mtimespec
+#endif
 
 /*! \brief Check if file on disk is more recent than saved timestamp.
  *
diff --git libgeda/include/libgeda_priv.h libgeda/include/libgeda_priv.h
index d23b198..715b43a 100644
--- libgeda/include/libgeda_priv.h
+++ libgeda/include/libgeda_priv.h
@@ -27,3 +27,9 @@
 
 /* Gettext translation */
 #include "gettext_priv.h"
+
+#if defined(__APPLE__) || defined(__NetBSD__) 
+#define st_atim st_atimespec
+#define st_ctim st_ctimespec
+#define st_mtim st_mtimespec
+#endif
diff --git utils/src/gsch2pcb.c utils/src/gsch2pcb.c
index 4bded6b..bf1bf61 100644
--- utils/src/gsch2pcb.c
+++ utils/src/gsch2pcb.c
@@ -31,6 +31,12 @@
 #include <unistd.h>
 #include <sys/stat.h>
 
+#if defined(__APPLE__) || defined(__NetBSD__) 
+#define st_atim st_atimespec
+#define st_ctim st_ctimespec
+#define st_mtim st_mtimespec
+#endif
+
 #define GSC2PCB_VERSION "1.6"
 
 #define DEFAULT_PCB_INC "pcb.inc"
