Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes unrecognised major/minor error on compiling #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexOwen
Copy link

When compiling it was failing with:

cc -O0 -g -Wall -Impt -DVERSION=\"1.3\"   -c -o mptevents.o mptevents.c
mptevents.c: In function ‘find_mptctl_device’:
mptevents.c:198:7: warning: implicit declaration of function ‘major’ [-Wimplicit-function-declaration]
   if (major(stbuf.st_rdev) == MISC_MAJOR_NUM &&
       ^~~~~
mptevents.c:199:6: warning: implicit declaration of function ‘minor’; did you mean ‘mknod’? [-Wimplicit-function-declaration]
     (minor(stbuf.st_rdev) == MPT2SAS_MINOR_NUM ||
      ^~~~~
      mknod
cc -O0 -g -Wall -Impt -DVERSION=\"1.3\"   -c -o mptparser.o mptparser.c
cc   mptevents.o mptparser.o   -o mptevents
/usr/bin/ld: mptevents.o: in function `find_mptctl_device':
/root/mptevents/mptevents.c:198: undefined reference to `major'
/usr/bin/ld: /root/mptevents/mptevents.c:199: undefined reference to `minor'
/usr/bin/ld: /root/mptevents/mptevents.c:200: undefined reference to `minor'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: mptevents] Error 1

This change fixes that.

When compiling it was failing with:

```
cc -O0 -g -Wall -Impt -DVERSION=\"1.3\"   -c -o mptevents.o mptevents.c
mptevents.c: In function ‘find_mptctl_device’:
mptevents.c:198:7: warning: implicit declaration of function ‘major’ [-Wimplicit-function-declaration]
   if (major(stbuf.st_rdev) == MISC_MAJOR_NUM &&
       ^~~~~
mptevents.c:199:6: warning: implicit declaration of function ‘minor’; did you mean ‘mknod’? [-Wimplicit-function-declaration]
     (minor(stbuf.st_rdev) == MPT2SAS_MINOR_NUM ||
      ^~~~~
      mknod
cc -O0 -g -Wall -Impt -DVERSION=\"1.3\"   -c -o mptparser.o mptparser.c
cc   mptevents.o mptparser.o   -o mptevents
/usr/bin/ld: mptevents.o: in function `find_mptctl_device':
/root/mptevents/mptevents.c:198: undefined reference to `major'
/usr/bin/ld: /root/mptevents/mptevents.c:199: undefined reference to `minor'
/usr/bin/ld: /root/mptevents/mptevents.c:200: undefined reference to `minor'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: mptevents] Error 1
```

This change fixes that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant