+#ifdef BSC_FD_CHECK
+ struct osmo_fd *entry;
+ llist_for_each_entry(entry, &osmo_fds, list) {
+ if (entry == fd) {
+ fprintf(stderr, "Adding a osmo_fd that is already in the list.\n");
+ return 0;
+ }
+ }
+#endif
+
+ llist_add_tail(&fd->list, &osmo_fds);