--- a/src/lib/mesa/src/util/libsync.h
+++ b/src/lib/mesa/src/util/libsync.h
@@ -65,6 +65,8 @@
 #define SYNC_IOC_MERGE		_IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data)
 #endif
 
+extern int drm_poll(struct pollfd *, nfds_t, int);
+
 static inline int sync_wait(int fd, int timeout)
 {
 	struct pollfd fds = {0};
@@ -74,7 +76,7 @@
 	fds.events = POLLIN;
 
 	do {
-		ret = poll(&fds, 1, timeout);
+		ret = drm_poll(&fds, 1, timeout);
 		if (ret > 0) {
 			if (fds.revents & (POLLERR | POLLNVAL)) {
 				errno = EINVAL;
