logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

meslibc.patch (1882B)


  1. SPDX-FileCopyrightText: 2025 fosslinux <fosslinux@aussies.space>
  2. SPDX-License-Identifier: BSD-3-Clause
  3. * paths.h does not exist, hardcode /tmp
  4. * mkstemp does not exist, replace with mktemp
  5. * getopt.h needs explicit inclusion
  6. * sig_atomic_t is undefineed
  7. --- oyacc-6.6/main.c 2025-02-05 14:14:48.552829130 +1100
  8. +++ oyacc-6.6/main.c 2025-02-05 14:20:05.025828293 +1100
  9. @@ -35,7 +35,7 @@
  10. #include <sys/types.h>
  11. #include <fcntl.h>
  12. -#include <paths.h>
  13. +#include <getopt.h>
  14. #include <signal.h>
  15. #include <stdlib.h>
  16. #include <unistd.h>
  17. @@ -104,7 +104,7 @@
  18. void create_file_names(void);
  19. void open_files(void);
  20. -volatile sig_atomic_t sigdie;
  21. +volatile int sigdie;
  22. void
  23. done(int k)
  24. @@ -234,7 +234,7 @@
  25. size_t len;
  26. char *tmpdir;
  27. - tmpdir = _PATH_TMP;
  28. + tmpdir = "/tmp";
  29. len = strlen(tmpdir);
  30. if (tmpdir[len - 1] == '/')
  31. @@ -300,7 +300,7 @@
  32. void
  33. open_files(void)
  34. {
  35. - int fd;
  36. + char *fname;
  37. create_file_names();
  38. @@ -309,12 +309,12 @@
  39. if (input_file == 0)
  40. open_error(input_file_name);
  41. }
  42. - fd = mkstemp(action_file_name);
  43. - if (fd == -1 || (action_file = fdopen(fd, "w")) == NULL)
  44. + fname = mktemp(action_file_name);
  45. + if (!fname || (action_file = fopen(fname, "w")) == NULL)
  46. open_error(action_file_name);
  47. - fd = mkstemp(text_file_name);
  48. - if (fd == -1 || (text_file = fdopen(fd, "w")) == NULL)
  49. + fname = mktemp(text_file_name);
  50. + if (!fname || (text_file = fopen(fname, "w")) == NULL)
  51. open_error(text_file_name);
  52. if (vflag) {
  53. @@ -326,8 +326,8 @@
  54. defines_file = fopen(defines_file_name, "w");
  55. if (defines_file == NULL)
  56. open_write_error(defines_file_name);
  57. - fd = mkstemp(union_file_name);
  58. - if (fd == -1 || (union_file = fdopen(fd, "w")) == NULL)
  59. + fname = mktemp(union_file_name);
  60. + if (!fname || (union_file = fopen(fname, "w")) == NULL)
  61. open_error(union_file_name);
  62. }
  63. output_file = fopen(output_file_name, "w");