Skip to content

Commit

Permalink
Compile fixes for XCode project
Browse files Browse the repository at this point in the history
  • Loading branch information
erimatnor committed Mar 10, 2013
1 parent 2ad1c59 commit c325873
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions include/common/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static inline unsigned long end_name_hash(unsigned long hash)
}

/* Compute the hash for a name string. */
static inline unsigned int
static inline unsigned long
full_name_hash(const char *name, unsigned int len)
{
unsigned long hash = init_name_hash();
Expand All @@ -110,7 +110,7 @@ full_name_hash(const char *name, unsigned int len)

/* Compute the hash for the bitprefix of a binary data structure.
The num_bits argument is the size of the prefix to use in bits. */
static inline unsigned int
static inline unsigned long
full_bitstring_hash(const void *bits_in, unsigned int num_bits)
{
const unsigned char *bits = (const unsigned char *)bits_in;
Expand Down
12 changes: 12 additions & 0 deletions macosx/serval/serval.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
4D5548C616ED361500108839 /* delay_queue.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D5548C216ED361500108839 /* delay_queue.c */; };
4D5548C716ED361500108839 /* serval_tcp_metrics.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D5548C416ED361500108839 /* serval_tcp_metrics.c */; };
4D86AE1B15121B72001FFC81 /* hashtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D86AE1715121B72001FFC81 /* hashtable.c */; };
4D86AE1C15121B72001FFC81 /* heap.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D86AE1815121B72001FFC81 /* heap.c */; };
4D86AE1D15121B72001FFC81 /* signal.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D86AE1915121B72001FFC81 /* signal.c */; };
Expand Down Expand Up @@ -60,6 +62,10 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
4D5548C216ED361500108839 /* delay_queue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = delay_queue.c; path = ../../src/stack/delay_queue.c; sourceTree = "<group>"; };
4D5548C316ED361500108839 /* delay_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = delay_queue.h; path = ../../src/stack/delay_queue.h; sourceTree = "<group>"; };
4D5548C416ED361500108839 /* serval_tcp_metrics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = serval_tcp_metrics.c; path = ../../src/stack/serval_tcp_metrics.c; sourceTree = "<group>"; };
4D5548C516ED361500108839 /* serval_udp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = serval_udp.h; path = ../../src/stack/serval_udp.h; sourceTree = "<group>"; };
4D86AD98151219AA001FFC81 /* serval */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = serval; sourceTree = BUILT_PRODUCTS_DIR; };
4D86ADA6151219C6001FFC81 /* atomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = atomic.h; sourceTree = "<group>"; };
4D86ADA7151219C6001FFC81 /* bitops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bitops.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -247,6 +253,10 @@
isa = PBXGroup;
children = (
4D86AE2915121C40001FFC81 /* af_serval.c */,
4D5548C216ED361500108839 /* delay_queue.c */,
4D5548C316ED361500108839 /* delay_queue.h */,
4D5548C416ED361500108839 /* serval_tcp_metrics.c */,
4D5548C516ED361500108839 /* serval_udp.h */,
4D86AE2A15121C40001FFC81 /* af_serval.h */,
4D86AE2B15121C40001FFC81 /* bst.c */,
4D86AE2C15121C40001FFC81 /* bst.h */,
Expand Down Expand Up @@ -407,6 +417,8 @@
4D86AE8015121C40001FFC81 /* telnet.c in Sources */,
4D86AE8115121C40001FFC81 /* timer.c in Sources */,
4D86AE8215121C40001FFC81 /* wait.c in Sources */,
4D5548C616ED361500108839 /* delay_queue.c in Sources */,
4D5548C716ED361500108839 /* serval_tcp_metrics.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
9 changes: 2 additions & 7 deletions src/common/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,13 @@ void signal_destroy(struct signal *s)

int signal_clear_val(struct signal *s, int *val)
{
int ret = 1;
ssize_t ret = 1;

while (ret > 0) {
ret = read(s->fd[0], val, sizeof(*val));

if (ret == -1) {
if (errno == EWOULDBLOCK)
ret = 0;
}
}

return ret > 0 ? 1 : ret;
return ret > 0;
}

int signal_clear(struct signal *s)
Expand Down

0 comments on commit c325873

Please sign in to comment.