e_os.h does not belong with the exported headers. Do not put it there and make all files the depend on it include it without prefixing it with openssl/. This means that all Makefiles will have $(TOP) as one of the include directories.
diff --git a/ssl/ssl_task.c b/ssl/ssl_task.c index cac701a..e36af0e 100644 --- a/ssl/ssl_task.c +++ b/ssl/ssl_task.c
@@ -124,7 +124,7 @@ #include <string.h> /* from ssltest.c */ #include <errno.h> -#include "openssl/e_os.h" +#include "e_os.h" #include <openssl/buffer.h> #include <openssl/x509.h>