Skip to content

Commit ddf5f62

Browse files
committed
Fixes shared_fd.h build error around include order
The linux/vm_sockets.h header is incomplete in the internal build and cannot be included before sys/socket.h. Bug: b/527614813
1 parent 9607959 commit ddf5f62

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

base/cvd/cuttlefish/common/libs/fs/shared_fd.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17-
// TODO: We can't use std::shared_ptr on the older guests due to HALs.
18-
1917
#ifndef CUTTLEFISH_COMMON_COMMON_LIBS_FS_SHARED_FD_H_
2018
#define CUTTLEFISH_COMMON_COMMON_LIBS_FS_SHARED_FD_H_
2119

22-
#ifdef __linux__
23-
#include <linux/vm_sockets.h>
24-
#include <sys/epoll.h>
25-
#include <sys/eventfd.h>
26-
#endif
2720
#include <errno.h>
2821
#include <fcntl.h>
2922
#include <string.h>
@@ -40,6 +33,12 @@
4033
#include <termios.h>
4134
#include <unistd.h>
4235

36+
#ifdef __linux__
37+
#include <linux/vm_sockets.h>
38+
#include <sys/epoll.h>
39+
#include <sys/eventfd.h>
40+
#endif
41+
4342
#include <chrono>
4443
#include <compare>
4544
#include <memory>

0 commit comments

Comments
 (0)