diff --git a/libntfs-3g/dir.c b/libntfs-3g/dir.c
index a66f807..5bc0709 100644
--- a/libntfs-3g/dir.c
+++ b/libntfs-3g/dir.c
@@ -50,6 +50,19 @@
 #include <sys/sysmacros.h>
 #endif
 
+#ifndef MINORBITS
+#define MINORBITS       20
+#endif
+#ifndef MINORMASK
+#define MINORMASK       ((1U << MINORBITS) - 1)
+#endif
+#ifndef major
+#define major(dev)      ((unsigned int) ((dev) >> MINORBITS))
+#endif
+#ifndef minor
+#define minor(dev)      ((unsigned int) ((dev) & MINORMASK))
+#endif
+
 #include "param.h"
 #include "types.h"
 #include "debug.h"
diff --git a/libntfs-3g/ioctl.c b/libntfs-3g/ioctl.c
index 2eef5a5..b3e3801 100644
--- a/libntfs-3g/ioctl.c
+++ b/libntfs-3g/ioctl.c
@@ -48,7 +48,9 @@
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
+#ifdef HAVE_SYSLOG_H
 #include <syslog.h>
+#endif
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
diff --git a/libntfs-3g/Makefile.in b/libntfs-3g/Makefile.in
index d3829ec..82143d2 100644
--- a/libntfs-3g/Makefile.in
+++ b/libntfs-3g/Makefile.in
@@ -984,7 +984,7 @@ install-dvi-am:
 
 install-exec-am: install-libLTLIBRARIES
 	@$(NORMAL_INSTALL)
-	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+	$(MAKE) $(AM_MAKEFLAGS)
 install-html: install-html-am
 
 install-html-am:
diff --git a/include/ntfs-3g/ntfstime.h b/include/ntfs-3g/ntfstime.h
index f3a89dd..ce0d458 100644
--- a/include/ntfs-3g/ntfstime.h
+++ b/include/ntfs-3g/ntfstime.h
@@ -36,6 +36,10 @@
 
 #include "types.h"
 
+#ifdef _SYS__TIMESPEC_H_
+#define __timespec_defined
+#endif
+
 /*
  * assume "struct timespec" is not defined if st_mtime is not defined
  */
