mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-30 09:58:55 +00:00
Fix Solaris compile error and some warnings
The mmap(2) MAP_FILE flag is not defined on Solaris, and is optional or ignored on Mac OS X and Linux. Two "unused variable" warnings. Issue #9.
This commit is contained in:
parent
59a969cfa3
commit
04abc7db0f
@ -104,8 +104,7 @@ int rhizome_direct_form_received(rhizome_http_request *r)
|
|||||||
rhizome_direct_clear_temporary_files(r);
|
rhizome_direct_clear_temporary_files(r);
|
||||||
return rhizome_server_simple_http_response(r,500,"Couldn't stat a file");
|
return rhizome_server_simple_http_response(r,500,"Couldn't stat a file");
|
||||||
}
|
}
|
||||||
unsigned char *addr = mmap(NULL, stat.st_size, PROT_READ,
|
unsigned char *addr = mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, fd, 0);
|
||||||
MAP_FILE|MAP_SHARED, fd, 0);
|
|
||||||
if (addr==MAP_FAILED) {
|
if (addr==MAP_FAILED) {
|
||||||
/* Clean up after ourselves */
|
/* Clean up after ourselves */
|
||||||
close(fd);
|
close(fd);
|
||||||
@ -438,7 +437,6 @@ int rhizome_direct_parse_http_request(rhizome_http_request *r)
|
|||||||
path = NULL;
|
path = NULL;
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
char *id = NULL;
|
|
||||||
INFOF("RHIZOME HTTP SERVER, GET %s", alloca_toprint(1024, path, pathlen));
|
INFOF("RHIZOME HTTP SERVER, GET %s", alloca_toprint(1024, path, pathlen));
|
||||||
if (strcmp(path, "/favicon.ico") == 0) {
|
if (strcmp(path, "/favicon.ico") == 0) {
|
||||||
r->request_type = RHIZOME_HTTP_REQUEST_FAVICON;
|
r->request_type = RHIZOME_HTTP_REQUEST_FAVICON;
|
||||||
@ -464,7 +462,6 @@ int rhizome_direct_parse_http_request(rhizome_http_request *r)
|
|||||||
path = NULL;
|
path = NULL;
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
char *id = NULL;
|
|
||||||
INFOF("RHIZOME HTTP SERVER, POST %s", alloca_toprint(1024, path, pathlen));
|
INFOF("RHIZOME HTTP SERVER, POST %s", alloca_toprint(1024, path, pathlen));
|
||||||
if ((strcmp(path, "/rhizome/import") == 0)
|
if ((strcmp(path, "/rhizome/import") == 0)
|
||||||
||(strcmp(path, "/rhizome/enquiry") == 0))
|
||(strcmp(path, "/rhizome/enquiry") == 0))
|
||||||
|
Loading…
Reference in New Issue
Block a user