Created
October 4, 2013 18:12
-
-
Save capflam/6830184 to your computer and use it in GitHub Desktop.
patch to fix https://github.com/klacke/yaws/issues/161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/mime_type_c.erl b/src/mime_type_c.erl | |
index 400aace..e40a708 100644 | |
--- a/src/mime_type_c.erl | |
+++ b/src/mime_type_c.erl | |
@@ -60,11 +60,10 @@ generate(ModFile, GInfo, SInfoMap) -> | |
%% "The pattern 'false' can never match the type 'true'" | |
Inc = case yaws_generated:is_local_install() of | |
true -> | |
- Info = ?MODULE:module_info(compile), | |
- SrcDir = filename:dirname( | |
- proplists:get_value(source, Info) | |
- ), | |
- F = filename:join([SrcDir, "../include/yaws.hrl"]), | |
+ IncDir = yaws:get_inc_dir(), | |
+ F = filename:absname( | |
+ filename:join([IncDir, "yaws.hrl"]) | |
+ ), | |
"-include(\""++F++"\")."; | |
_ -> | |
"-include_lib(\"yaws/include/yaws.hrl\")." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment