Fix bad net_clone.c compilation when CONFIG_NET_SOCKOPTS is not defined
This commit is contained in:
parent
e94faba7f5
commit
82696356c8
@ -155,7 +155,7 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
{
|
{
|
||||||
err = EINVAL;
|
err = EINVAL;
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the socket type */
|
/* Return the socket type */
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
{
|
{
|
||||||
err = EINVAL;
|
err = EINVAL;
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the timeout value. This is a atomic operation and should
|
/* Get the timeout value. This is a atomic operation and should
|
||||||
* require no special operation.
|
* require no special operation.
|
||||||
@ -217,6 +217,7 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
err = ENOPROTOOPT;
|
err = ENOPROTOOPT;
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
errout:
|
errout:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/net_clone.c
|
* net/net_clone.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2011-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -75,10 +75,10 @@ int net_clone(FAR struct socket *psock1, FAR struct socket *psock2)
|
|||||||
psock2->s_flags = psock1->s_flags; /* See _SF_* definitions */
|
psock2->s_flags = psock1->s_flags; /* See _SF_* definitions */
|
||||||
#ifdef CONFIG_NET_SOCKOPTS
|
#ifdef CONFIG_NET_SOCKOPTS
|
||||||
psock2->s_options = psock1->s_options; /* Selected socket options */
|
psock2->s_options = psock1->s_options; /* Selected socket options */
|
||||||
#endif
|
|
||||||
#ifndef CONFIG_DISABLE_CLOCK
|
#ifndef CONFIG_DISABLE_CLOCK
|
||||||
psock2->s_rcvtimeo = psock1->s_rcvtimeo; /* Receive timeout value (in deciseconds) */
|
psock2->s_rcvtimeo = psock1->s_rcvtimeo; /* Receive timeout value (in deciseconds) */
|
||||||
psock2->s_sndtimeo = psock1->s_sndtimeo; /* Send timeout value (in deciseconds) */
|
psock2->s_sndtimeo = psock1->s_sndtimeo; /* Send timeout value (in deciseconds) */
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
psock2->s_conn = psock1->s_conn; /* UDP or TCP connection structure */
|
psock2->s_conn = psock1->s_conn; /* UDP or TCP connection structure */
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ int psock_setsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
{
|
{
|
||||||
err = EINVAL;
|
err = EINVAL;
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the value. Is the option being set or cleared? */
|
/* Get the value. Is the option being set or cleared? */
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ int psock_setsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
{
|
{
|
||||||
err = EINVAL;
|
err = EINVAL;
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the timeout value */
|
/* Get the timeout value */
|
||||||
|
|
||||||
@ -226,6 +226,7 @@ int psock_setsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
err = ENOPROTOOPT;
|
err = ENOPROTOOPT;
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
errout:
|
errout:
|
||||||
|
Loading…
Reference in New Issue
Block a user