[Asterisk-code-review] BuildSystem: Fix build on FreeBSD due to missing crypt.h (asterisk[13])

Joshua Colp asteriskteam at digium.com
Mon Jun 12 15:57:33 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5781 )

Change subject: BuildSystem: Fix build on FreeBSD due to missing crypt.h
......................................................................


BuildSystem: Fix build on FreeBSD due to missing crypt.h

FreeBSD does not include a crypt.h include file. Definitions for
crypt() and crypt_r() are in unistd.h

ASTERISK-27042 #close

Change-Id: Ib307ee5e384870c6af50efa89fb73722dd0c3a7e
---
M main/crypt.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  George Joseph: Looks good to me, approved
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit



diff --git a/main/crypt.c b/main/crypt.c
index 5e5df02..c44d800 100644
--- a/main/crypt.c
+++ b/main/crypt.c
@@ -31,7 +31,7 @@
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #include <unistd.h>
-#if defined(HAVE_CRYPT_R)
+#if defined(HAVE_CRYPT_R) && !defined(__FreeBSD__)
 #include <crypt.h>
 #endif
 

-- 
To view, visit https://gerrit.asterisk.org/5781
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib307ee5e384870c6af50efa89fb73722dd0c3a7e
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list