diff --git a/contrib/bootstrap b/contrib/bootstrap
index b65ea5788bd6da05f142239730f4ad73800d5699..e395a02652c690860998dd447576f6df61d6f3f7 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -219,7 +219,7 @@ check_ios_sdk()
 check_macosx_sdk()
 {
 	if [ -z "$SDKROOT" ]; then
-		SDKROOT=$(xcrun --show-sdk-path)
+		SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
 		echo "SDKROOT not specified, assuming $SDKROOT"
 	fi