aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/objectivec/objectivec_field.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/objectivec/objectivec_field.cc')
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_field.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_field.cc
index b071ce5d..93fffe0e 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_field.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_field.cc
@@ -39,10 +39,6 @@
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/strutil.h>
-#ifndef htonl
-#include <netinet/in.h>
-#endif
-
namespace google {
namespace protobuf {
namespace compiler {
@@ -107,7 +103,7 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor,
string field_options = descriptor->options().SerializeAsString();
// Must convert to a standard byte order for packing length into
// a cstring.
- uint32_t length = htonl(field_options.length());
+ uint32 length = ghtonl(field_options.length());
if (length > 0) {
string bytes((const char*)&length, sizeof(length));
bytes.append(field_options);