From 5bedc6468031c0fd3394facbc34f563ce263661a Mon Sep 17 00:00:00 2001 From: zimoch Date: Mon, 7 Mar 2011 16:51:35 +0000 Subject: [PATCH] allow aliases without library --- require.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/require.c b/require.c index fc06d43..a1054b2 100644 --- a/require.c +++ b/require.c @@ -146,7 +146,9 @@ int require(char* lib, char* vers) /* no munched lib */ libname[strlen(libname)-6]=0; /* skip ".munch" */ } - if (stat(libname, &filestat) == ERROR) + if (stat(libname, &filestat) == ERROR && + /* allow alias without library */ + stat(depname, &filestat) == ERROR) { /* still no library found */ printf("Library %s not found\n", libname);