Skip to content

Commit 70b1c5f

Browse files
committed
modify compile warnning
1 parent 0e39583 commit 70b1c5f

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

uinet/freebsd/net/bpf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,7 @@ struct bpf_zbuf_header {
11321132
* don't already define it, define it as 245.
11331133
*/
11341134
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)
1135+
#undef DLT_PFSYNC
11351136
#define DLT_PFSYNC 246
11361137
#endif
11371138

uinet/freebsd/net/if_ethersubr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@ VNET_SYSUNINIT(vnet_ether_uninit, SI_SUB_PROTO_IF, SI_ORDER_ANY,
752752
vnet_ether_destroy, NULL);
753753
#endif
754754

755+
void packet_rcv(struct ifnet *ifp, struct mbuf *m);
755756

756757

757758
static void

uinet/lib/ff_host_interface.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ int uhi_nanosleep(uint64_t nsecs);
124124

125125
int uhi_mutex_init(uhi_mutex_t *m, int opts);
126126
void uhi_mutex_destroy(uhi_mutex_t *m);
127+
void _uhi_mutex_lock(uhi_mutex_t *m, void *l, const char *file, int line);
128+
int _uhi_mutex_trylock(uhi_mutex_t *m, void *l, const char *file, int line);
129+
void _uhi_mutex_unlock(uhi_mutex_t *m, void *l, const char *file, int line);
130+
int _uhi_mtx_owned(uhi_mutex_t *m);
131+
127132

128133

129134
int uhi_nanosleep(uint64_t nsecs);

uinet/lib/ff_lock.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ void
120120
__mtx_lock_spin_flags(volatile uintptr_t *c, int opts, const char *file,
121121
int line)
122122
{
123-
_uhi_mutex_lock(c, c, file, line);
123+
_uhi_mutex_lock((uhi_mutex_t *)c, (void *)c, file, line);
124124
}
125125

126126

127127
void
128128
__mtx_unlock_spin_flags(volatile uintptr_t *c, int opts, const char *file,
129129
int line)
130130
{
131-
_uhi_mutex_unlock(c, c, file, line);
131+
_uhi_mutex_unlock((uhi_mutex_t *)c, (void *)c, file, line);
132132
}
133133

134134

@@ -137,7 +137,7 @@ int
137137
_mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file, int line)
138138
{
139139
int rval;
140-
rval = _uhi_mutex_trylock(c, c, file, line);
140+
rval = _uhi_mutex_trylock((uhi_mutex_t *)c, (void *)c, file, line);
141141

142142
return (rval);
143143
}
@@ -157,14 +157,14 @@ thread_lock_flags_(struct thread *td, int opts, const char *file, int line)
157157
void
158158
__mtx_lock_flags(volatile uintptr_t *c, int opts, const char *file, int line)
159159
{
160-
_uhi_mutex_lock(c, c, file, line);
160+
_uhi_mutex_lock((uhi_mutex_t *)c, (void *)c, file, line);
161161
}
162162

163163

164164
void
165165
__mtx_unlock_flags(volatile uintptr_t *c, int opts, const char *file, int line)
166166
{
167-
_uhi_mutex_unlock(c, c, file, line);
167+
_uhi_mutex_unlock((uhi_mutex_t *)c, (void *)c, file, line);
168168
}
169169

170170

0 commit comments

Comments
 (0)