title: How can I convert a file pointer ( FILE* fp ) to a file descriptor (int fd)?
body: <p>I have a <code>FILE *</code>, returned by a call to <code>fopen()</code>. I need to get a file descriptor from it, to make calls like <code>fsync(fd)</code> on it. What's the function to get a file descriptor from a file pointer?</p>