Skip to content

Commit

Permalink
Add missing header
Browse files Browse the repository at this point in the history
Fix build issue:

```
/tmp/libfreefare/libfreefare/felica.c:50:16: error: implicitly declaring library
      function 'malloc' with type 'void *(unsigned long)'
      [-Werror,-Wimplicit-function-declaration]
    if ((tag = malloc(sizeof(struct felica_tag)))) {
               ^
/tmp/libfreefare/libfreefare/felica.c:50:16: note: include the header <stdlib.h>
      or explicitly provide a declaration for 'malloc'
/tmp/libfreefare/libfreefare/felica.c:64:5: error: implicit declaration of
      function 'free' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    free(tag);
    ^
2 errors generated.
```
  • Loading branch information
smortex committed Jan 26, 2019
1 parent 26754f8 commit ba63f18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libfreefare/felica.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>

#include <sys/types.h>
Expand Down

0 comments on commit ba63f18

Please sign in to comment.