Skip to content

Commit

Permalink
Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
duckythescientist committed Apr 16, 2018
1 parent ced1d7d commit de310d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions mmapf.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>

Expand Down Expand Up @@ -49,7 +48,7 @@ int munmapf(mmapf_ctx *ctx) {
return 0;
}

int mmapf(mmapf_ctx *ctx, const unsigned char *filename, size_t size, int flags) {
int mmapf(mmapf_ctx *ctx, const char *filename, size_t size, int flags) {
size_t page_sz = sysconf(_SC_PAGESIZE);
struct stat sb;

Expand Down
5 changes: 4 additions & 1 deletion mmapf.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#ifndef __MMAPF_H_
#define __MMAPF_H_

#include <stdlib.h>


typedef struct {
void *mem;
size_t mmap_sz;
Expand Down Expand Up @@ -38,7 +41,7 @@ typedef struct {
#define MMAPF_EXLAST 1003

char * mmapf_strerror(int);
int mmapf(mmapf_ctx *, const unsigned char *, size_t, int);
int mmapf(mmapf_ctx *, const char *, size_t, int);
int munmapf(mmapf_ctx *);

/* vim: set ts=2 sw=2 et ai si: */
Expand Down

0 comments on commit de310d7

Please sign in to comment.