Skip to content

Conversation

fraggerfox
Copy link
Contributor

Currently the build in NetBSD using the native curses build fails with the following error

--- Settings.o ---
Settings.c: In function 'signal_safe_fprintf':
Settings.c:627:4: error: unknown type name 'va_list'
  627 |    va_list vl;
      |    ^~~~~~~
Settings.c:29:1: note: 'va_list' is defined in header '<stdarg.h>'; did you forget to '#include <stdarg.h>'?
   28 | #include "Platform.h"
  +++ |+#include <stdarg.h>
   29 | #include "Process.h"
Settings.c:628:4: warning: implicit declaration of function 'va_start' [-Wimplicit-function-declaration]
  628 |    va_start(vl, fmt);
      |    ^~~~~~~~
In file included from /usr/include/stdio.h:595,
                 from XUtils.h:20,
                 from HeaderLayout.h:15,
                 from Settings.h:15,
                 from Settings.c:10:
Settings.c:629:45: warning: passing argument 6 of '__builtin___vsnprintf_chk' makes pointer from integer without a cast [-Wint-conversion]
  629 |    int n = vsnprintf(buf, sizeof(buf), fmt, vl);
      |                                             ^~
      |                                             |
      |                                             int
Settings.c:629:45: note: expected '__va_list_tag *' but argument is of type 'int'
Settings.c:630:4: warning: implicit declaration of function 'va_end' [-Wimplicit-function-declaration]
  630 |    va_end(vl);
      |    ^~~~~~
*** [Settings.o] Error code 1

The build works as expected with ncurses option enabled which is also what is used in the CI. However for NetBSD the builtin curses is the default option when building.

@fraggerfox fraggerfox marked this pull request as ready for review March 10, 2025 20:41
@BenBE BenBE added bug 🐛 Something isn't working build system 🔧 Affects the build system rather then the user experience NetBSD 🎏 NetBSD related issues labels Mar 10, 2025
@BenBE BenBE added this to the 3.4.1 milestone Mar 10, 2025
@BenBE BenBE merged commit f5d1a97 into htop-dev:main Mar 10, 2025
19 checks passed
@fraggerfox fraggerfox deleted the fix-netbsd-builtin-curses-build branch March 11, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐛 Something isn't working build system 🔧 Affects the build system rather then the user experience NetBSD 🎏 NetBSD related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants