Skip to content

Commit

Permalink
Undo _map_libc mapping of arc4random* functions (re: 13c6f5d)
Browse files Browse the repository at this point in the history
It breaks the build on (at least) Void (musl) and 32-bit Slackware
15.0 (glibc-2.33). The libast dependencies are too intricate and
messy for it to be reasonable to fix this properly, so just undo.
Thanks to @pghvlaans for the report.

Resolves: #778
  • Loading branch information
McDutchie committed Aug 25, 2024
1 parent 13c6f5d commit df26d4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
13 changes: 6 additions & 7 deletions src/lib/libast/Mamfile
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,6 @@ make install virtual
exec - invoke_iffe %{<}
done

note * ast_random.h *
make FEATURE/random
makp features/random
exec - invoke_iffe %{<}
done

note * sig.h: AST replacement for <signal.h>
make FEATURE/sig
makp features/sig.sh
Expand Down Expand Up @@ -193,7 +187,6 @@ make install virtual
make FEATURE/map
make features/map.c
prev sig.h
prev FEATURE/random
prev FEATURE/api
prev FEATURE/eaccess
prev FEATURE/options
Expand Down Expand Up @@ -583,6 +576,12 @@ make install virtual
exec - invoke_iffe %{<} -I.
done

note * ast_random.h *
make FEATURE/random
makp features/random
exec - invoke_iffe %{<}
done

note * copy most of the FEATURE/* results above to canonically named header files; separating
note * this allows all of the above tests, which don't depend on each other, to run in parallel

Expand Down
15 changes: 0 additions & 15 deletions src/lib/libast/features/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "FEATURE/options"
#include "FEATURE/eaccess"
#include "FEATURE/api"
#include "FEATURE/random"
#include <sig.h>

#if _opt_map_libc && !defined(_map_libc)
Expand Down Expand Up @@ -67,20 +66,6 @@ main(void)
printf("\n");
printf("#define _map_libc 1\n");
#endif
#if _map_libc
#if !_lib_arc4random
printf("#undef arc4random\n");
printf("#define arc4random _ast_arc4random\n");
#endif
#if !_lib_arc4random_buf
printf("#undef arc4random_buf\n");
printf("#define arc4random_buf _ast_arc4random_buf\n");
#endif
#if !_lib_arc4random_uniform
printf("#undef arc4random_uniform\n");
printf("#define arc4random_uniform _ast_arc4random_uniform\n");
#endif
#endif
#if _map_libc || defined(__linux__)
printf("#undef basename\n");
printf("#define basename _ast_basename\n");
Expand Down

0 comments on commit df26d4f

Please sign in to comment.