You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by lo...@apache.org on 2022/04/27 02:26:02 UTC

[incubator-brpc] branch master updated: [UPDATE] fix c struct compile error

This is an automated email from the ASF dual-hosted git repository.

lorinlee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 1241b0d9 [UPDATE] fix c struct compile error
     new be4d5885 Merge pull request #1736 from wolfdan666/patch-1
1241b0d9 is described below

commit 1241b0d90412ab90fb0f7caba0acce083f05271c
Author: Franklin Shan <37...@users.noreply.github.com>
AuthorDate: Mon Apr 11 17:33:07 2022 +0800

    [UPDATE] fix c struct compile error
    
    solve this error. make it the same as bthread.h
---
 src/bthread/unstable.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bthread/unstable.h b/src/bthread/unstable.h
index ee0fa631..dadf9c04 100644
--- a/src/bthread/unstable.h
+++ b/src/bthread/unstable.h
@@ -46,7 +46,7 @@ extern int bthread_about_to_quit();
 // Run `on_timer(arg)' at or after real-time `abstime'. Put identifier of the
 // timer into *id.
 // Return 0 on success, errno otherwise.
-extern int bthread_timer_add(bthread_timer_t* id, timespec abstime,
+extern int bthread_timer_add(bthread_timer_t* id, struct timespec abstime,
                              void (*on_timer)(void*), void* arg);
 
 // Unschedule the timer associated with `id'.
@@ -65,7 +65,7 @@ extern int bthread_fd_wait(int fd, unsigned events);
 // or CLOCK_REALTIME reached `abstime' if abstime is not NULL.
 // Returns 0 on success, -1 otherwise and errno is set.
 extern int bthread_fd_timedwait(int fd, unsigned epoll_events,
-                                const timespec* abstime);
+                                const struct timespec* abstime);
 
 // Close file descriptor `fd' and wake up all threads waiting on it.
 // User should call this function instead of close(2) if bthread_fd_wait,
@@ -76,7 +76,7 @@ extern int bthread_fd_timedwait(int fd, unsigned epoll_events,
 extern int bthread_close(int fd);
 
 // Replacement of connect(2) in bthreads.
-extern int bthread_connect(int sockfd, const sockaddr* serv_addr,
+extern int bthread_connect(int sockfd, const struct sockaddr* serv_addr,
                            socklen_t addrlen);
 
 // Add a startup function that each pthread worker will run at the beginning


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org