add osmo_fd_setup() convenience function to fill-in osmo_fd

This basically follows the concept of osmo_timer_setup() and allows
the caller to fill-in all configurable fields of osmo_fd in one
line of code, rather than open-coding it in 5 lines everywhere.

Change-Id: I6dbf19ea22fd65302bfc5424c10418d1b7939094
diff --git a/include/osmocom/core/select.h b/include/osmocom/core/select.h
index 2abda2d..b6fed3c 100644
--- a/include/osmocom/core/select.h
+++ b/include/osmocom/core/select.h
@@ -36,6 +36,10 @@
 	unsigned int priv_nr;
 };
 
+void osmo_fd_setup(struct osmo_fd *ofd, int fd, unsigned int when,
+		   int (*cb)(struct osmo_fd *fd, unsigned int what),
+		   void *data, unsigned int priv_nr);
+
 bool osmo_fd_is_registered(struct osmo_fd *fd);
 int osmo_fd_register(struct osmo_fd *fd);
 void osmo_fd_unregister(struct osmo_fd *fd);