Fix build without metadata support
Commit f36352dc4e introduced the parameter
pipe_timeout for the metadata config. If shairport-sync is now configured
without metadata support, the build fails with:
```
shairport.c: In function ‘main’:
shairport.c:766:9: error: ‘shairport_cfg {aka struct <anonymous>}’ has no member named ‘metadata_pipe_timeout’
config.metadata_pipe_timeout = 5000; //milliseconds
```
Fix this by opting-out the affected code with CONFIG_METADATA.
This commit is contained in:
@@ -513,6 +513,7 @@ uint64_t get_absolute_time_in_fp() {
|
||||
return time_now_fp;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_METADATA
|
||||
ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
|
||||
void *ibuf = (void *)buf;
|
||||
size_t bytes_remaining = count;
|
||||
@@ -547,6 +548,7 @@ ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
|
||||
return rc;
|
||||
// return write(fd,buf,count);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* from http://coding.debuntu.org/c-implementing-str_replace-replace-all-occurrences-substring#comment-722 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user