Skip to content

Commit 0696987

Browse files
committed
Suppress deprecation warnings from the latest libc
rust-lang/libc#2963
1 parent fbdac70 commit 0696987

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sys/socket/mod.rs

+10
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,17 @@ libc_bitflags! {
272272
/// Sends or requests out-of-band data on sockets that support this notion
273273
/// (e.g., of type [`Stream`](enum.SockType.html)); the underlying protocol must also
274274
/// support out-of-band data.
275+
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
275276
MSG_OOB;
276277
/// Peeks at an incoming message. The data is treated as unread and the next
277278
/// [`recv()`](fn.recv.html)
278279
/// or similar function shall still return this data.
280+
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
279281
MSG_PEEK;
280282
/// Receive operation blocks until the full amount of data can be
281283
/// returned. The function may return smaller amount of data if a signal
282284
/// is caught, an error or disconnect occurs.
285+
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
283286
MSG_WAITALL;
284287
/// Enables nonblocking operation; if the operation would block,
285288
/// `EAGAIN` or `EWOULDBLOCK` is returned. This provides similar
@@ -291,8 +294,10 @@ libc_bitflags! {
291294
/// which will affect all threads in
292295
/// the calling process and as well as other processes that hold
293296
/// file descriptors referring to the same open file description.
297+
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
294298
MSG_DONTWAIT;
295299
/// Receive flags: Control Data was discarded (buffer too small)
300+
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
296301
MSG_CTRUNC;
297302
/// For raw ([`Packet`](addr/enum.AddressFamily.html)), Internet datagram
298303
/// (since Linux 2.4.27/2.6.8),
@@ -302,15 +307,18 @@ libc_bitflags! {
302307
/// domain ([unix(7)](https://linux.die.net/man/7/unix)) sockets.
303308
///
304309
/// For use with Internet stream sockets, see [tcp(7)](https://linux.die.net/man/7/tcp).
310+
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
305311
MSG_TRUNC;
306312
/// Terminates a record (when this notion is supported, as for
307313
/// sockets of type [`SeqPacket`](enum.SockType.html)).
314+
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
308315
MSG_EOR;
309316
/// This flag specifies that queued errors should be received from
310317
/// the socket error queue. (For more details, see
311318
/// [recvfrom(2)](https://linux.die.net/man/2/recvfrom))
312319
#[cfg(any(target_os = "android", target_os = "linux"))]
313320
#[cfg_attr(docsrs, doc(cfg(all())))]
321+
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
314322
MSG_ERRQUEUE;
315323
/// Set the `close-on-exec` flag for the file descriptor received via a UNIX domain
316324
/// file descriptor using the `SCM_RIGHTS` operation (described in
@@ -326,6 +334,7 @@ libc_bitflags! {
326334
target_os = "netbsd",
327335
target_os = "openbsd"))]
328336
#[cfg_attr(docsrs, doc(cfg(all())))]
337+
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
329338
MSG_CMSG_CLOEXEC;
330339
/// Requests not to send `SIGPIPE` errors when the other end breaks the connection.
331340
/// (For more details, see [send(2)](https://linux.die.net/man/2/send)).
@@ -340,6 +349,7 @@ libc_bitflags! {
340349
target_os = "openbsd",
341350
target_os = "solaris"))]
342351
#[cfg_attr(docsrs, doc(cfg(all())))]
352+
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
343353
MSG_NOSIGNAL;
344354
}
345355
}

0 commit comments

Comments
 (0)