[Tile-serving] [mod_tile] Compile errors on FreeBSD 10.1-RELEASE (#114)

lungdart notifications at github.com
Tue Nov 3 18:15:57 UTC 2015


I honestly have no idea how to do that. (I'm a hardware guy, not familiar with collaboration tools and procedures.)

Here are the change sets though:

* src/gen_tile_test.cpp, Add the following includes
```cpp
#include <pthread.h>
#include <sys/wait.h>
```

* src/gen_tile_test.cpp, change *addition_thread() to look like this:
```cpp
void *addition_thread(void * arg) {
    struct request_queue * queue = (struct request_queue *)arg;
    struct item * item;
    struct timespec time;
    //unsigned int seed = syscall(SYS_gettid);
    unsigned int seed = (unsigned long long int)pthread_self();
    #ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
```

* src/mod_tile.c Change the hashkey line to look like this
```cpp
//hashkey = (ip.s6_addr32[0] ^ ip.s6_addr32[1] ^ ip.s6_addr32[2] ^ ip.s6_addr32[3]) % DELAY_HASHTABLE_SIZ
hashkey = (*((uint32_t *)(&ip.s6_addr[0])) ^ *((uint32_t *)(&ip.s6_addr[4])) ^ *((uint32_t *)(&ip.s6_addr[8])) ^ *((uint32_t *)(&ip.s6_addr[12]))) % DELAY_HASHTABLE_SIZE;
```

Then it should compile. Feel free to turn these change sets into a patch to put upstream. Good luck!

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/issues/114#issuecomment-153441699
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20151103/6aa29707/attachment.html>


More information about the Tile-serving mailing list