jbedworth / cld2

Automatically exported from code.google.com/p/cld2
0 stars 0 forks source link

Missing include in cld2_dynamic_data_loader.cc #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to compile the cld_2_dynamic_data_tool with gcc 4.8 in Ubuntu 12.04

What is the expected output? What do you see instead?

It fails because close() isn't defined. close() is declared in <unistd.h> and 
adding that include makes it compile.

I could do a patch but I suspects it is much faster for everyone that a 
maintainer just does this manually:

index 7227b8e..06375e18 100644
--- a/third_party/cld_2/src/internal/cld2_dynamic_data_loader.cc
+++ b/third_party/cld_2/src/internal/cld2_dynamic_data_loader.cc
@@ -19,6 +19,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/mman.h>
+#include <unistd.h>

 #include "cld2_dynamic_data.h"
 #include "cld2_dynamic_data_loader.h"

Original issue reported on code.google.com by brat...@opera.com on 29 Aug 2014 at 8:22

GoogleCodeExporter commented 9 years ago
This was fixed by r166, which was committed to address issue 19; your patch 
shows a dependency in your source on sys/mman.h, which was removed in the same 
commit. Please update your checkout to the latest source; all the latest 
changes are 100% backwards-compatible.

Original comment by andrewha...@google.com on 29 Aug 2014 at 11:33