Skip to content

mknod.c major/minor compile erros on Fedora #1

@JonJFineman

Description

@JonJFineman

I compiled this on Fedora 32 (new install) and found the below compile errors. The patch following the errors resolved them.

mknod.c:69:6: error: called object ‘major’ is not a function or function pointer
69 | if (major(dev) != major || minor(dev) != minor) {
| ^~~~~
mknod.c:47:8: note: declared here
47 | u_int major, minor;
| ^~~~~
mknod.c:69:29: error: called object ‘minor’ is not a function or function pointer
69 | if (major(dev) != major || minor(dev) != minor) {
| ^~~~~
mknod.c:47:15: note: declared here
47 | u_int major, minor;
| ^~~~~

This patch resolved them.
$ git diff
diff --git a/src/mknod.c b/src/mknod.c
index 2e336a7..1092d36 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -35,6 +35,7 @@

#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <errno.h>

#include "sh.h"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions