Skip to content

Commit

Permalink
fix build errors on Ubuntu Bionic (WSL)
Browse files Browse the repository at this point in the history
Fix the sysmacros configure check to look for not-yes instead of
explicit no for sys/mkdev.h, since it seems like autoconf here doesn't
ever check for sys/mkdev.h.

Unrelated, fix -Wformat-security in LinuxProcess.c, use %s format rather
than a directly using the string we want to copy.
  • Loading branch information
aswild committed Aug 18, 2019
1 parent 0280849 commit 8c3289d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dnl glibc 2.25 deprecates 'major' and 'minor' in <sys/types.h> and requires to
dnl include <sys/sysmacros.h>. However the logic in AC_HEADER_MAJOR has not yet
dnl been updated in Autoconf 2.69, so use a workaround:
m4_version_prereq([2.70], [],
[if test "x$ac_cv_header_sys_mkdev_h" = xno; then
[if test "x$ac_cv_header_sys_mkdev_h" != xyes; then
AC_CHECK_HEADER(sys/sysmacros.h, [AC_DEFINE(MAJOR_IN_SYSMACROS, 1,
[Define to 1 if `major', `minor', and `makedev' are declared in <sys/sysmacros.h>.])])
fi])
Expand Down
2 changes: 1 addition & 1 deletion linux/LinuxProcess.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static inline void LinuxProcess_printPerfCounter(float val, int len, char* buffe
if (val != -1) {
xSnprintf(buffer, n, perfFmt[len], val);
} else {
xSnprintf(buffer, n, perfNA[len]);
xSnprintf(buffer, n, "%s", perfNA[len]);
*attr = CRT_colors[PROCESS_SHADOW];
}
}
Expand Down

0 comments on commit 8c3289d

Please sign in to comment.