New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android build fixes #709
Closed
Closed
Android build fixes #709
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Resolve: src/tvhpoll.c: In function 'tvhpoll_create': src/tvhpoll.c:73:3: error: implicit declaration of function 'epoll_create1' [-Werror=implicit-function-declaration] if ((fd = epoll_create1(EPOLL_CLOEXEC)) < 0) { ^ src/tvhpoll.c:73:27: error: 'EPOLL_CLOEXEC' undeclared (first use in this function) if ((fd = epoll_create1(EPOLL_CLOEXEC)) < 0) { ^
Resolve: src/fsmonitor.c: In function 'fsmonitor_init': src/fsmonitor.c:108:3: error: implicit declaration of function 'inotify_init1' [-Werror=implicit-function-declaration] fsmonitor_fd = inotify_init1(IN_CLOEXEC); ^ src/fsmonitor.c:108:32: error: 'IN_CLOEXEC' undeclared (first use in this function) fsmonitor_fd = inotify_init1(IN_CLOEXEC); ^
src/dvr/dvr_rec.c:32:25: fatal error: sys/statvfs.h: No such file or directory #include <sys/statvfs.h> ^
src/satip/rtp.c: In function 'satip_rtcp_thread': src/satip/rtp.c:608:7: error: implicit declaration of function 'sendto' [-Werror=implicit-function-declaration] r = sendto(rtp->fd_rtcp, msg, len, 0, ^
src/input/mpegts/iptv/iptv_rtsp.c: In function 'iptv_rtsp_read': src/input/mpegts/iptv/iptv_rtsp.c:264:5: error: implicit declaration of function 'recv' [-Werror=implicit-function-declaration] r = recv(im->mm_iptv_fd2, buf, sizeof(buf), MSG_DONTWAIT); ^
src/timeshift/timeshift_reader.c: In function '_timeshift_read': src/timeshift/timeshift_reader.c:353:5: error: format '%jd' expects argument of type 'intmax_t', but argument 8 has type 'off_t' [-Werror=format=] tvhtrace("timeshift", "ts %d seek to %jd (fd %i)", ts->id, tsf->roff, tsf->rfd); ^ src/timeshift/timeshift_reader.c:369:5: error: format '%ld' expects argument of type 'long int', but argument 9 has type 'ssize_t' [-Werror=format=] tvhtrace("timeshift", "ts %d read msg %p (%ld)", ts->id, *sm, r); // Android bug, ssize_t is long int ^ src/timeshift/timeshift_reader.c:377:9: error: format '%jd' expects argument of type 'intmax_t', but argument 8 has type 'off_t' [-Werror=format=] tvhtrace("timeshift", "ts %d seek to %jd (fd %i) (incomplete)", ts->id, tsf->roff, tsf->rfd); ^
src/dvr/dvr_inotify.c: In function 'dvr_inotify_init': src/dvr/dvr_inotify.c:66:3: error: implicit declaration of function 'inotify_init1' [-Werror=implicit-function-declaration] _inot_fd = inotify_init1(IN_CLOEXEC); ^ src/dvr/dvr_inotify.c:66:28: error: 'IN_CLOEXEC' undeclared (first use in this function) _inot_fd = inotify_init1(IN_CLOEXEC); ^
src/descrambler/capmt.c: In function 'capmt_write_msg': src/descrambler/capmt.c:620:5: error: format '%li' expects argument of type 'long int', but argument 9 has type 'ssize_t' [-Werror=format=] tvhlog(LOG_DEBUG, "capmt", "%s: Message send failed to socket %i (%li)", capmt_name(capmt), fd, res); // Android bug, ssize_t is long int ^
implemented pthread_mutex_timedlock. http://aleksmaus.blogspot.de/2011/12/missing-pthreadmutextimedlock-on.html
@@ -63,7 +63,11 @@ pthread_t dvr_inotify_tid; | |||
|
|||
void dvr_inotify_init ( void ) | |||
{ | |||
#if ENABLE_ANDROID | |||
_inot_fd = inotify_init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, define inotify_init1 in tvheadend.h - there's already android block - like:
#define inotify_init1(a) inotify_init()
implemented pthread_mutex_timedlock http://aleksmaus.blogspot.de/2011/12/missing-pthreadmutextimedlock-on.html
add casting to support compilation with android ndk. src/timeshift/timeshift_reader.c: In function '_timeshift_read': src/timeshift/timeshift_reader.c:353:5: error: format '%jd' expects argument of type 'intmax_t', but argument 8 has type 'off_t' [-Werror=format=] tvhtrace("timeshift", "ts %d seek to %jd (fd %i)", ts->id, tsf->roff, tsf->rfd); ^ src/timeshift/timeshift_reader.c:369:5: error: format '%ld' expects argument of type 'long int', but argument 9 has type 'ssize_t' [-Werror=format=] tvhtrace("timeshift", "ts %d read msg %p (%ld)", ts->id, *sm, r); // Android bug, ssize_t is long int ^ src/timeshift/timeshift_reader.c:377:9: error: format '%jd' expects argument of type 'intmax_t', but argument 8 has type 'off_t' [-Werror=format=] tvhtrace("timeshift", "ts %d seek to %jd (fd %i) (incomplete)", ts->id, tsf->roff, tsf->rfd); ^
Thanks merged in one patch: 857a7fb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I encountered some compilation error when trying to build tvheadend for android
I hope it resolves all errors.