Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Give it a better chance to work on MacOS X

  • Loading branch information...
commit 63707a62e38326813826d1016ac4be909e0c9c66 1 parent 74af653
khorben authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 DeforaOS/Apps/Devel/src/asm/src/code.c
View
6 DeforaOS/Apps/Devel/src/asm/src/code.c
@@ -166,7 +166,11 @@ static AsmFormat * _new_file_format(char const * filename, FILE * fp)
DIR * dir;
struct dirent * de;
size_t len;
+#ifdef __APPLE__
+ char const ext[] = ".dylib";
+#else
char const ext[] = ".so";
+#endif
int hasflat = 0;
AsmFormat * format = NULL;
@@ -180,7 +184,7 @@ static AsmFormat * _new_file_format(char const * filename, FILE * fp)
}
while((de = readdir(dir)) != NULL)
{
- if((len = strlen(de->d_name)) < 4)
+ if((len = strlen(de->d_name)) < sizeof(ext))
continue;
if(strcmp(&de->d_name[len - sizeof(ext) + 1], ext) != 0)
continue;
Please sign in to comment.
Something went wrong with that request. Please try again.