Просмотр исходного кода

Fix two Solaris compile problems

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1462 f882894a-f735-0410-b71e-b25c423dba1c
Ton Voon 19 лет назад
Родитель
Сommit
62f916d181
2 измененных файлов с 6 добавлено и 1 удалено
  1. 1 1
      plugins-root/check_dhcp.c
  2. 5 0
      plugins/common.h

+ 1 - 1
plugins-root/check_dhcp.c

@@ -1196,7 +1196,7 @@ static int dl_bind(int fd, int sap, u_char *addr){
 	bind_req->dl_xidtest_flg = 0;
 	put_ctrl(fd, sizeof(dl_bind_req_t), 0);
 	get_msg(fd);
-	if GOT_ERR == check_ctrl(DL_BIND_ACK)){
+	if (GOT_ERR == check_ctrl(DL_BIND_ACK)){
 		printf(_("Error: DLPI stream API failed to get MAC in dl_bind/check_ctrl(): %s.\n"), strerror(errno));
 		exit(STATE_UNKNOWN);
 		}

+ 5 - 0
plugins/common.h

@@ -114,6 +114,11 @@
 #include <locale.h>
 #endif
 
+/* Fixes "Cannot use swapctl in the large files compilation environment" error on Solaris */
+#ifdef _FILE_OFFSET_BITS
+#undef _FILE_OFFSET_BITS
+#endif
+
 #ifdef HAVE_DECL_SWAPCTL
 # ifdef HAVE_SYS_SWAP_H
 #  include <sys/swap.h>